Skip to content
Snippets Groups Projects

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

3 files
+ 2
1
Compare changes
  • Side-by-side
  • Inline

Files

+ 1
0
@@ -882,6 +882,7 @@ where
@@ -882,6 +882,7 @@ where
let number_of_blocks_to_reconstruct_file = block.shard.k;
let number_of_blocks_to_reconstruct_file = block.shard.k;
debug!("Number of blocks to reconstruct file {} : {}", file_hash, number_of_blocks_to_reconstruct_file);
debug!("Number of blocks to reconstruct file {} : {}", file_hash, number_of_blocks_to_reconstruct_file);
if verify::<F,G,P>(&block, &powers)? {
if verify::<F,G,P>(&block, &powers)? {
 
//TODO check if the new block is not linearly dependant with the other blocks already on disk
debug!("Block {} for file {} was verified successfully; Now dumping to disk", block_response.block_hash, file_hash);
debug!("Block {} for file {} was verified successfully; Now dumping to disk", block_response.block_hash, file_hash);
let _ = fs::dump(&block, &block_dir, None, Compress::Yes)?;
let _ = fs::dump(&block, &block_dir, None, Compress::Yes)?;
number_of_blocks_written += 1;
number_of_blocks_written += 1;
Loading