From 9226a14c567fcad96a3d6f97f0b9251fc593c639 Mon Sep 17 00:00:00 2001 From: Arni Hod Date: Thu, 26 Dec 2024 13:42:23 +0200 Subject: [PATCH] chore(starknet_gateway): use the get nonce method of the stateful validator trait --- .../src/stateful_transaction_validator.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/crates/starknet_gateway/src/stateful_transaction_validator.rs b/crates/starknet_gateway/src/stateful_transaction_validator.rs index fd04f6d66f..b08e6cf0f3 100644 --- a/crates/starknet_gateway/src/stateful_transaction_validator.rs +++ b/crates/starknet_gateway/src/stateful_transaction_validator.rs @@ -11,7 +11,7 @@ use blockifier::versioned_constants::VersionedConstants; #[cfg(test)] use mockall::automock; use starknet_api::block::BlockInfo; -use starknet_api::core::{ContractAddress, Nonce}; +use starknet_api::core::Nonce; use starknet_api::executable_transaction::{ AccountTransaction as ExecutableTransaction, InvokeTransaction as ExecutableInvokeTransaction, @@ -42,11 +42,6 @@ pub trait StatefulTransactionValidatorTrait { account_tx: AccountTransaction, skip_validate: bool, ) -> BlockifierStatefulValidatorResult<()>; - - fn get_nonce( - &mut self, - account_address: ContractAddress, - ) -> BlockifierStatefulValidatorResult; } impl StatefulTransactionValidatorTrait for BlockifierStatefulValidator { @@ -57,13 +52,6 @@ impl StatefulTransactionValidatorTrait for BlockifierStatefulValidator { ) -> BlockifierStatefulValidatorResult<()> { self.perform_validations(account_tx, skip_validate) } - - fn get_nonce( - &mut self, - account_address: ContractAddress, - ) -> BlockifierStatefulValidatorResult { - self.get_nonce(account_address) - } } impl StatefulTransactionValidator {