From 466742d1bff6bc5527852ae6bc4b47cd6b19549f Mon Sep 17 00:00:00 2001 From: Danil Date: Tue, 7 Nov 2023 14:24:10 +0100 Subject: [PATCH] Fix tests Signed-off-by: Danil --- .../lib/multivm/src/versions/vm_latest/tests/l2_blocks.rs | 8 +++----- .../lib/multivm/src/versions/vm_latest/tests/rollbacks.rs | 4 ++-- .../src/versions/vm_latest/tests/tester/inner_state.rs | 4 +--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/core/lib/multivm/src/versions/vm_latest/tests/l2_blocks.rs b/core/lib/multivm/src/versions/vm_latest/tests/l2_blocks.rs index fb13e99af8a..4fd4e0207d4 100644 --- a/core/lib/multivm/src/versions/vm_latest/tests/l2_blocks.rs +++ b/core/lib/multivm/src/versions/vm_latest/tests/l2_blocks.rs @@ -15,11 +15,9 @@ use crate::vm_latest::utils::l2_blocks::get_l2_block_hash_key; use crate::vm_latest::{HistoryEnabled, Vm}; use crate::HistoryMode; use zk_evm_1_4_0::aux_structures::Timestamp; -use zksync_state::{ReadStorage, WriteStorage}; -use zksync_system_constants::{ - CURRENT_VIRTUAL_BLOCK_INFO_POSITION, REQUIRED_L1_TO_L2_GAS_PER_PUBDATA_BYTE, -}; -use zksync_types::block::{pack_block_info, unpack_block_info}; +use zksync_state::WriteStorage; +use zksync_system_constants::REQUIRED_L1_TO_L2_GAS_PER_PUBDATA_BYTE; +use zksync_types::block::pack_block_info; use zksync_types::{ block::{legacy_miniblock_hash, miniblock_hash}, AccountTreeId, Execute, ExecuteTransactionCommon, L1BatchNumber, L1TxCommonData, diff --git a/core/lib/multivm/src/versions/vm_latest/tests/rollbacks.rs b/core/lib/multivm/src/versions/vm_latest/tests/rollbacks.rs index d18c98d9c83..343d30dcd95 100644 --- a/core/lib/multivm/src/versions/vm_latest/tests/rollbacks.rs +++ b/core/lib/multivm/src/versions/vm_latest/tests/rollbacks.rs @@ -6,7 +6,7 @@ use zksync_contracts::test_contracts::LoadnextContractExecutionParams; use zksync_state::WriteStorage; use zksync_types::{get_nonce_key, Execute, U256}; -use crate::interface::dyn_tracers::vm_1_3_3::DynTracer; +use crate::interface::dyn_tracers::vm_1_4_0::DynTracer; use crate::interface::tracer::{TracerExecutionStatus, TracerExecutionStopReason}; use crate::interface::{TxExecutionMode, VmExecutionMode, VmInterface, VmInterfaceHistoryEnabled}; use crate::vm_latest::tests::tester::{ @@ -158,7 +158,7 @@ struct MaxRecursionTracer { /// Tracer responsible for calculating the number of storage invocations and /// stopping the VM execution if the limit is reached. -impl DynTracer> for MaxRecursionTracer {} +impl DynTracer> for MaxRecursionTracer {} impl VmTracer for MaxRecursionTracer { fn finish_cycle( diff --git a/core/lib/multivm/src/versions/vm_latest/tests/tester/inner_state.rs b/core/lib/multivm/src/versions/vm_latest/tests/tester/inner_state.rs index 2d73e1be51a..ec9ffe785f9 100644 --- a/core/lib/multivm/src/versions/vm_latest/tests/tester/inner_state.rs +++ b/core/lib/multivm/src/versions/vm_latest/tests/tester/inner_state.rs @@ -74,9 +74,7 @@ pub(crate) struct VmInstanceInnerState { impl Vm { // Dump inner state of the VM. - pub(crate) fn dump_inner_state( - &self, - ) -> VmInstanceInnerState { + pub(crate) fn dump_inner_state(&self) -> VmInstanceInnerState { let event_sink = self.state.event_sink.clone(); let precompile_processor_state = PrecompileProcessorTestInnerState { timestamp_history: self.state.precompiles_processor.timestamp_history.clone(),