Skip to content
Snippets Groups Projects

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

1 file
+ 6
4
Compare changes
  • Side-by-side
  • Inline
+ 6
4
@@ -848,15 +848,17 @@ where
@@ -848,15 +848,17 @@ where
}
}
},
},
Some(block_response) = block_receiver.recv() => {
Some(block_response) = block_receiver.recv() => {
//TODO check the blocks, save them, potentially make the file
//TODO check the blocks with the proof, save them
 
//TODO break when we get to k blocks (enough to make the file)
todo!()
todo!()
}
}
}
}
//TODO add a break condition or change the loop to a while with a boolean check
}
}
//TODO await the response and start requesting the blocks
//TODO try to reconstruct the file with the first k received blocks
//TODO when you can reconstruct the file
//TODO if it fails, keep requesting block info, try to check which matrix is invertible taking k-1 blocks already on disk and one more that isn't
 
//TODO if it fails, do the same with k-2, etc...
 
//TODO when a combination of the blocks that works is found, request the missing blocks
//TODO return the path where the file was stored
//TODO return the path where the file was stored
todo!()
todo!()
}
}
Loading