Skip to content
Snippets Groups Projects

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

1 file
+ 2
4
Compare changes
  • Side-by-side
  • Inline
@@ -4,8 +4,6 @@ use std assert
# define variables
let SWARM = swarm create 2
let record_name = "tata"
let message = "it works at least"
let sleep_duration = 5sec
mut node_is_setup = false
let output_dir: path = "/tmp/dragoon_test/received_blocks"
@@ -74,8 +72,8 @@ try {
print "\nNode 0 starts providing the file"
app start-provide --node $SWARM.0.ip_port $file_hash
print "\nSleeping for 2sec to ensure the start provide finished"
sleep 2sec
print $"\nSleeping for ($sleep_duration) to ensure the start provide finished"
sleep $sleep_duration
print "Resuming execution\n"
print "Node 1 starts searching for the providers with the file hash"
Loading