From a59c7734667603e2d6c3d3716bb5d68301afe2b4 Mon Sep 17 00:00:00 2001 From: Guoteng Rao <3603304+grao1991@users.noreply.github.com> Date: Wed, 16 Aug 2023 15:10:41 -0700 Subject: [PATCH] [Execution] Do not hold the Arc of committed block in execution. --- execution/executor/src/block_executor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/execution/executor/src/block_executor.rs b/execution/executor/src/block_executor.rs index 0ea9dc82dade6..217e3c4587cfb 100644 --- a/execution/executor/src/block_executor.rs +++ b/execution/executor/src/block_executor.rs @@ -185,7 +185,7 @@ where block_id, transactions, } = block; - let committed_block = self.block_tree.root_block(); + let committed_block_id = self.committed_block_id(); let mut block_vec = self .block_tree .get_blocks_opt(&[block_id, parent_block_id])?; @@ -203,7 +203,7 @@ where return Ok(b.output.as_state_compute_result(parent_accumulator)); } - let output = if parent_block_id != committed_block.id && parent_output.has_reconfiguration() + let output = if parent_block_id != committed_block_id && parent_output.has_reconfiguration() { info!( LogSchema::new(LogEntry::BlockExecutor).block_id(block_id),