Skip to content
Snippets Groups Projects

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

4 files
+ 14
16
Compare changes
  • Side-by-side
  • Inline

Files

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