Skip to content
Snippets Groups Projects

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

4 files
+ 29
1
Compare changes
  • Side-by-side
  • Inline

Files

+ 9
0
@@ -140,6 +140,9 @@ pub(crate) enum DragoonCommand {
multiaddr: String,
sender: Sender<u64>,
},
NodeInfo {
sender: Sender<PeerId>,
},
RemoveListener {
listener_id: u64,
sender: Sender<bool>,
@@ -172,6 +175,7 @@ impl std::fmt::Display for DragoonCommand {
DragoonCommand::GetNetworkInfo { .. } => write!(f, "get-network-info"),
DragoonCommand::GetProviders { .. } => write!(f, "get-providers"),
DragoonCommand::Listen { .. } => write!(f, "listen"),
DragoonCommand::NodeInfo { .. } => write!(f, "node-info"),
DragoonCommand::RemoveListener { .. } => write!(f, "remove-listener"),
DragoonCommand::StartProvide { .. } => write!(f, "start-provide"),
}
@@ -398,6 +402,11 @@ pub(crate) async fn create_cmd_listen(
dragoon_command!(state, Listen, multiaddr)
}
pub(crate) async fn create_cmd_node_info(State(state): State<Arc<AppState>>) -> Response {
info!("running command `node_info`");
dragoon_command!(state, NodeInfo)
}
pub(crate) async fn create_cmd_remove_listener(
Path(listener_id): Path<u64>,
State(state): State<Arc<AppState>>,
Loading