From fc6a668a1e3a226ce518e0d1c0fa93ce7a8c7ffd Mon Sep 17 00:00:00 2001 From: Daniyar Itegulov Date: Wed, 4 Dec 2024 14:28:37 +1100 Subject: [PATCH] remove unnecessary `Arc` wrappers --- core/node/api_server/src/tx_sender/tests/send_tx.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/node/api_server/src/tx_sender/tests/send_tx.rs b/core/node/api_server/src/tx_sender/tests/send_tx.rs index 0f4a7b6647e1..c0b02e45ad89 100644 --- a/core/node/api_server/src/tx_sender/tests/send_tx.rs +++ b/core/node/api_server/src/tx_sender/tests/send_tx.rs @@ -22,8 +22,8 @@ async fn submitting_tx_requires_one_connection() { .unwrap(); let l2_chain_id = L2ChainId::default(); - let fee_params_provider: Arc = - Arc::new(MockBatchFeeParamsProvider::default()); + let fee_params_provider: &dyn BatchFeeModelInputProvider = + &MockBatchFeeParamsProvider::default(); let fee_input = fee_params_provider.get_batch_fee_input().await.unwrap(); let (base_fee, gas_per_pubdata) = derive_base_fee_and_gas_per_pubdata(fee_input, ProtocolVersionId::latest().into()); @@ -129,8 +129,8 @@ async fn fee_validation_errors() { let l2_chain_id = L2ChainId::default(); let tx_executor = SandboxExecutor::mock(MockOneshotExecutor::default()).await; let (tx_sender, _) = create_test_tx_sender(pool.clone(), l2_chain_id, tx_executor).await; - let fee_params_provider: Arc = - Arc::new(MockBatchFeeParamsProvider::default()); + let fee_params_provider: &dyn BatchFeeModelInputProvider = + &MockBatchFeeParamsProvider::default(); let fee_input = fee_params_provider.get_batch_fee_input().await.unwrap(); let (base_fee, gas_per_pubdata) = derive_base_fee_and_gas_per_pubdata(fee_input, ProtocolVersionId::latest().into()); @@ -320,8 +320,8 @@ async fn submit_tx_with_validation_traces(actual_range: Range, expected_ran .unwrap(); let l2_chain_id = L2ChainId::default(); - let fee_params_provider: Arc = - Arc::new(MockBatchFeeParamsProvider::default()); + let fee_params_provider: &dyn BatchFeeModelInputProvider = + &MockBatchFeeParamsProvider::default(); let fee_input = fee_params_provider.get_batch_fee_input().await.unwrap(); let (base_fee, gas_per_pubdata) = derive_base_fee_and_gas_per_pubdata(fee_input, ProtocolVersionId::latest().into());