diff --git a/pool/src/pool.rs b/pool/src/pool.rs index 277607e7e..a62b26791 100644 --- a/pool/src/pool.rs +++ b/pool/src/pool.rs @@ -102,7 +102,10 @@ where .filter(|x| x.state == from_state) .collect::>(); - let candidate_txs = entries.iter().map(|x| x.tx.clone()).collect(); + let candidate_txs: Vec = entries.iter().map(|x| x.tx.clone()).collect(); + if candidate_txs.is_empty() { + return Ok(vec![]); + } let valid_txs = self.blockchain.validate_raw_txs(candidate_txs, extra_tx)?; // Update state on all entries included in final vec of valid txs.