Skip to content

Commit

Permalink
chore(starknet_gateway): use the get nonce method of the stateful val…
Browse files Browse the repository at this point in the history
…idator trait
  • Loading branch information
ArniStarkware committed Dec 26, 2024
1 parent 4a95470 commit 9226a14
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions crates/starknet_gateway/src/stateful_transaction_validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -42,11 +42,6 @@ pub trait StatefulTransactionValidatorTrait {
account_tx: AccountTransaction,
skip_validate: bool,
) -> BlockifierStatefulValidatorResult<()>;

fn get_nonce(
&mut self,
account_address: ContractAddress,
) -> BlockifierStatefulValidatorResult<Nonce>;
}

impl StatefulTransactionValidatorTrait for BlockifierStatefulValidator {
Expand All @@ -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<Nonce> {
self.get_nonce(account_address)
}
}

impl StatefulTransactionValidator {
Expand Down

0 comments on commit 9226a14

Please sign in to comment.