Skip to content

Commit

Permalink
do not use chain object to get the block but use storage
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzhhuang committed Oct 10, 2024
1 parent 90b6ef8 commit b5018a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sync/src/block_connector/write_block_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ where
pub fn reset(&mut self, block_id: HashValue) -> Result<()> {
let new_head_block = self
.main
.get_block(block_id)?
.get_storage()
.get_block_by_hash(block_id)?
.ok_or_else(|| format_err!("Can not find block {} in main chain", block_id,))?;
let new_branch = BlockChain::new(
self.config.net().time_service(),
Expand Down

0 comments on commit b5018a0

Please sign in to comment.