Skip to content
Snippets Groups Projects

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

1 file
+ 17
0
Compare changes
  • Side-by-side
  • Inline
+ 17
0
@@ -204,3 +204,20 @@ export def get-file [
$"get-file/($file_hash)/($output_filename)/($powers_path | slash replace)" | run-command $node
}
export def get-blocks-info-from [
peer_id_base_58: string,
filename: string,
--node: string = $DEFAULT_IP,
] nothing -> any {
log debug $"Getting the list of blocks from ($peer_id_base_58) for file ($filename)"
$"get-blocks-info-from/($peer_id_base_58)/($filename)" | run-command $node
}
export def get-block-list [
filename: string,
--node: string = $DEFAULT_IP,
] nothing -> any {
log debug $"Getting the list of blocks for file ($filename) from own node"
$"get-block-list/($filename)" | run-command $node
}
Loading