diff --git a/crates/mempool/src/transaction_queue.rs b/crates/mempool/src/transaction_queue.rs index 7e480286..bbe80da7 100644 --- a/crates/mempool/src/transaction_queue.rs +++ b/crates/mempool/src/transaction_queue.rs @@ -20,8 +20,15 @@ pub struct TransactionQueue { impl TransactionQueue { /// Adds a transaction to the mempool, ensuring unique keys. /// Panics: if given a duplicate tx. + // TODO(Mohammad): Add test for two transactions from the same address, expecting specific + // assert. pub fn insert(&mut self, tx: TransactionReference) { - assert_eq!(self.address_to_nonce.insert(tx.sender_address, tx.nonce), None); + assert_eq!( + self.address_to_nonce.insert(tx.sender_address, tx.nonce), + None, + "Only a single transaction from the same contract class can be in the mempool at a \ + time." + ); assert!( self.queue.insert(tx.into()), "Keys should be unique; duplicates are checked prior."