From 7982caa05f6d8cf58ec15a7bea6c551098e1c503 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 9 May 2025 23:15:42 +0200 Subject: [PATCH] chore: remove_auths doc (#16137) --- crates/transaction-pool/src/pool/txpool.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/transaction-pool/src/pool/txpool.rs b/crates/transaction-pool/src/pool/txpool.rs index c0c6e73f62..2b587036aa 100644 --- a/crates/transaction-pool/src/pool/txpool.rs +++ b/crates/transaction-pool/src/pool/txpool.rs @@ -1615,6 +1615,9 @@ impl AllTransactions { result } + /// Removes any pending auths for the given transaction. + /// + /// This is a noop for non EIP-7702 transactions. fn remove_auths(&mut self, tx: &PoolInternalTransaction) { let Some(auths) = &tx.transaction.authority_ids else { return }; @@ -1974,6 +1977,7 @@ impl AllTransactions { #[cfg(any(test, feature = "test-utils"))] pub(crate) fn assert_invariants(&self) { assert_eq!(self.by_hash.len(), self.txs.len(), "by_hash.len() != txs.len()"); + assert!(self.auths.len() <= self.txs.len(), "auths > txs.len()"); } }