diff --git a/shared/src/chain_state.rs b/shared/src/chain_state.rs index 46642e8d32..0f6f8437da 100644 --- a/shared/src/chain_state.rs +++ b/shared/src/chain_state.rs @@ -101,9 +101,6 @@ impl ChainState { pub fn add_tx_to_pool(&self, tx: Transaction, max_cycles: Cycle) -> Result { let mut tx_pool = self.tx_pool.borrow_mut(); - if tx_pool.filter.contains(&tx.hash()) { - return Err(PoolError::AlreadyInPool); - } let short_id = tx.proposal_short_id(); let rtx = self.resolve_tx_from_pool(&tx, &tx_pool); let verify_result = self.verify_rtx(&rtx, max_cycles); diff --git a/shared/src/tx_pool/pool.rs b/shared/src/tx_pool/pool.rs index 02349e887c..c948b253f0 100644 --- a/shared/src/tx_pool/pool.rs +++ b/shared/src/tx_pool/pool.rs @@ -22,10 +22,6 @@ impl TxFilter { pub fn insert(&mut self, hash: H256) -> bool { self.map.insert(hash, ()).is_none() } - - pub fn contains(&self, hash: &H256) -> bool { - self.map.contains_key(&hash) - } } #[derive(Debug, Clone)]