diff --git a/crates/transaction-pool/src/pool/mod.rs b/crates/transaction-pool/src/pool/mod.rs index 44c8f1ee8..055064fa5 100644 --- a/crates/transaction-pool/src/pool/mod.rs +++ b/crates/transaction-pool/src/pool/mod.rs @@ -650,6 +650,9 @@ where &self, hashes: Vec, ) -> Vec>> { + if hashes.is_empty() { + return Vec::new() + } let removed = self.pool.write().remove_transactions(hashes); let mut listener = self.event_listener.write(); @@ -692,6 +695,9 @@ where &self, txs: Vec, ) -> Vec>> { + if txs.is_empty() { + return Vec::new() + } self.pool.read().get_all(txs).collect() }