unsave block body
unsave block body
MODIFY
storage/src/block/mod.rs
storage/src/block/mod.rs
@@ -180,13 +180,12 @@ impl BlockStorage {
}
pub fn commit_block(&self, block: Block) -> Result<()> {
- let (header, body) = block.clone().into_inner();
+ let (header, _) = block.clone().into_inner();
//save header
- let block_id = header.id();
self.save_header(header)?;
- //save body
- self.save_body(block_id, body)?;
- //save block cache
+ // save block , no need body
+ // self.save_body(block_id, body)?;
+ //save block
self.save(block)
}
pub fn delete_block(&self, block_id: HashValue) -> Result<()> {

MODIFY
storage/src/lib.rs
storage/src/lib.rs
@@ -295,6 +295,7 @@ impl BlockStore for Storage {
self.block_storage.get_blocks(ids)
}
+ #[allow(deprecated)]
fn get_body(&self, block_id: HashValue) -> Result<Option<BlockBody>> {
self.block_storage.get_body(block_id)
}

unsave block body (#2995)

unsave block body