From b67d918ad2b6ba34799fdf837142707cd50b2cc7 Mon Sep 17 00:00:00 2001 From: Mohammad Nassar Date: Wed, 10 Jul 2024 11:47:04 +0300 Subject: [PATCH] refactor(mempool): refactor get_nonce method for transaction queue --- crates/mempool/src/transaction_queue.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/mempool/src/transaction_queue.rs b/crates/mempool/src/transaction_queue.rs index f4a2b2bc..2a9b1904 100644 --- a/crates/mempool/src/transaction_queue.rs +++ b/crates/mempool/src/transaction_queue.rs @@ -45,8 +45,8 @@ impl TransactionQueue { self.queue.iter().rev().map(|tx| &tx.0) } - pub fn _get_nonce(&self, address: &ContractAddress) -> Option<&Nonce> { - self.address_to_tx.get(address).map(|tx| &tx.nonce) + pub fn _get_nonce(&self, address: ContractAddress) -> Option { + self.address_to_tx.get(&address).map(|tx| tx.nonce) } }