diff --git a/crates/mempool/src/transaction_pool.rs b/crates/mempool/src/transaction_pool.rs index ba1a2552..9c7f5249 100644 --- a/crates/mempool/src/transaction_pool.rs +++ b/crates/mempool/src/transaction_pool.rs @@ -73,15 +73,15 @@ impl TransactionPool { } #[derive(Debug, Default)] -struct AccountTransactionIndex(pub HashMap>); +struct AccountTransactionIndex(HashMap>); impl AccountTransactionIndex { /// If the transaction already exists in the mapping, the old value is returned. - pub fn insert(&mut self, tx: TransactionReference) -> Option { + fn insert(&mut self, tx: TransactionReference) -> Option { self.0.entry(tx.sender_address).or_default().insert(tx.nonce, tx) } - pub fn remove(&mut self, tx: TransactionReference) -> Option { + fn remove(&mut self, tx: TransactionReference) -> Option { let TransactionReference { sender_address, nonce, .. } = tx; let account_txs = self.0.get_mut(&sender_address)?; @@ -94,7 +94,7 @@ impl AccountTransactionIndex { removed_tx } - pub fn get(&self, address: ContractAddress, nonce: Nonce) -> Option<&TransactionReference> { + fn get(&self, address: ContractAddress, nonce: Nonce) -> Option<&TransactionReference> { self.0.get(&address)?.get(&nonce) } }