From 0b46c719a534087949a2e86a86e502f5bc73e1f9 Mon Sep 17 00:00:00 2001 From: Alden Hu Date: Tue, 15 Oct 2024 17:14:06 -0700 Subject: [PATCH] don't serialize PipelinedBlock::state_compute_result (#14969) --- consensus/consensus-types/src/pipelined_block.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/consensus/consensus-types/src/pipelined_block.rs b/consensus/consensus-types/src/pipelined_block.rs index 375dd93a0a1cf..67a972757fe8a 100644 --- a/consensus/consensus-types/src/pipelined_block.rs +++ b/consensus/consensus-types/src/pipelined_block.rs @@ -62,14 +62,12 @@ impl Serialize for PipelinedBlock { struct SerializedBlock<'a> { block: &'a Block, input_transactions: &'a Vec, - state_compute_result: &'a StateComputeResult, randomness: Option<&'a Randomness>, } let serialized = SerializedBlock { block: &self.block, input_transactions: &self.input_transactions, - state_compute_result: &self.state_compute_result, randomness: self.randomness.get(), }; serialized.serialize(serializer) @@ -86,21 +84,19 @@ impl<'de> Deserialize<'de> for PipelinedBlock { struct SerializedBlock { block: Block, input_transactions: Vec, - state_compute_result: StateComputeResult, randomness: Option, } let SerializedBlock { block, input_transactions, - state_compute_result, randomness, } = SerializedBlock::deserialize(deserializer)?; let block = PipelinedBlock { block, input_transactions, - state_compute_result, + state_compute_result: StateComputeResult::new_dummy(), randomness: OnceCell::new(), pipeline_insertion_time: OnceCell::new(), execution_summary: Arc::new(OnceCell::new()),