diff --git a/crates/mempool/src/mempool_test.rs b/crates/mempool/src/mempool_test.rs index 9d87ef905..76e80005a 100644 --- a/crates/mempool/src/mempool_test.rs +++ b/crates/mempool/src/mempool_test.rs @@ -12,6 +12,7 @@ use starknet_types_core::felt::Felt; use crate::mempool::{Mempool, MempoolInput, TransactionReference}; use crate::transaction_pool::TransactionPool; +use crate::transaction_queue::TransactionQueue; impl FromIterator for TransactionPool { fn from_iter>(txs: T) -> Self { @@ -23,6 +24,16 @@ impl FromIterator for TransactionPool { } } +impl FromIterator for TransactionQueue { + fn from_iter>(txs: T) -> Self { + let mut queue = Self::default(); + for tx in txs { + queue.insert(tx); + } + queue + } +} + #[track_caller] fn add_tx(mempool: &mut Mempool, input: &MempoolInput) { assert_eq!(mempool.add_tx(input.clone()), Ok(()));