From f8c68639d1163fae99deb965f2d88fe23bcea015 Mon Sep 17 00:00:00 2001 From: perekopskiy Date: Tue, 22 Oct 2024 20:48:09 +0300 Subject: [PATCH] nits --- core/lib/vm_interface/src/types/inputs/execution_mode.rs | 4 ++-- core/lib/vm_interface/src/utils/shadow.rs | 2 +- core/node/commitment_generator/src/lib.rs | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/lib/vm_interface/src/types/inputs/execution_mode.rs b/core/lib/vm_interface/src/types/inputs/execution_mode.rs index 9a93d3e0617..f091a259d30 100644 --- a/core/lib/vm_interface/src/types/inputs/execution_mode.rs +++ b/core/lib/vm_interface/src/types/inputs/execution_mode.rs @@ -27,8 +27,8 @@ pub enum InspectExecutionMode { impl From for VmExecutionMode { fn from(mode: InspectExecutionMode) -> Self { match mode { - InspectExecutionMode::Bootloader => VmExecutionMode::Bootloader, - InspectExecutionMode::OneTx => VmExecutionMode::OneTx, + InspectExecutionMode::Bootloader => Self::Bootloader, + InspectExecutionMode::OneTx => Self::OneTx, } } } diff --git a/core/lib/vm_interface/src/utils/shadow.rs b/core/lib/vm_interface/src/utils/shadow.rs index a8b84a338a9..724ca54187d 100644 --- a/core/lib/vm_interface/src/utils/shadow.rs +++ b/core/lib/vm_interface/src/utils/shadow.rs @@ -257,7 +257,7 @@ where fn finish_batch(&mut self, pubdata_builder: Rc) -> FinishedL1Batch { let main_batch = self.main.finish_batch(pubdata_builder.clone()); if let Some(shadow) = self.shadow.get_mut() { - let shadow_batch = shadow.vm.finish_batch(pubdata_builder.clone()); + let shadow_batch = shadow.vm.finish_batch(pubdata_builder); let mut errors = DivergenceErrors::new(); errors.check_results_match( &main_batch.block_tip_execution_result, diff --git a/core/node/commitment_generator/src/lib.rs b/core/node/commitment_generator/src/lib.rs index 3a36f3970da..9a33d4766f6 100644 --- a/core/node/commitment_generator/src/lib.rs +++ b/core/node/commitment_generator/src/lib.rs @@ -292,11 +292,11 @@ impl CommitmentGenerator { vec![Default::default(); num_blobs_required(&protocol_version)] }; - let mut connection = self - .connection_pool - .connection_tagged("commitment_generator") - .await?; let aggregation_root = if protocol_version.is_pre_gateway() { + let mut connection = self + .connection_pool + .connection_tagged("commitment_generator") + .await?; read_aggregation_root(&mut connection, l1_batch_number).await? } else { H256::zero()