Skip to content
Snippets Groups Projects

Write `get-file` and commands to get the list of blocks from another node

2 files
+ 5
5
Compare changes
  • Side-by-side
  • Inline

Files

+ 4
4
use tokio::sync::{mpsc::UnboundedSender, Mutex};
use tokio::sync::mpsc::UnboundedSender;
use crate::commands::DragoonCommand;
pub(crate) struct AppState {
pub sender: Mutex<UnboundedSender<DragoonCommand>>,
pub cmd_sender: UnboundedSender<DragoonCommand>
}
impl AppState {
pub fn new(sender: UnboundedSender<DragoonCommand>) -> Self {
pub fn new(cmd_sender: UnboundedSender<DragoonCommand>) -> Self {
AppState {
sender: Mutex::new(sender),
cmd_sender,
}
}
}
Loading