Skip to content

Commit b92741a

Browse files
authored
refactor(tree): remove unnecessary block clone (#19848)
1 parent ef0c1e2 commit b92741a

File tree

1 file changed

+1
-1
lines changed
  • crates/engine/tree/src/tree

1 file changed

+1
-1
lines changed

crates/engine/tree/src/tree/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,8 @@ where
704704
// gather all blocks until new head number.
705705
while current_canonical_number > current_number {
706706
if let Some(block) = self.canonical_block_by_hash(old_hash)? {
707-
old_chain.push(block.clone());
708707
old_hash = block.recovered_block().parent_hash();
708+
old_chain.push(block);
709709
current_canonical_number -= 1;
710710
} else {
711711
// This shouldn't happen as we're walking back the canonical chain

0 commit comments

Comments
 (0)