diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/view.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/view.rs index dd3cf6bddcc6..0fa90ccfcb31 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/view.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/view.rs @@ -455,9 +455,9 @@ where } } - /// Returns true if the transaction hash is already imported into the view + /// Returns true if the transaction with given hash is already imported into the view. pub(super) fn is_imported(&self, tx_hash: &ExtrinsicHash) -> bool { const IGNORE_BANNED: bool = false; - self.pool.validated_pool().check_is_known(tx_hash, IGNORE_BANNED).is_ok() + self.pool.validated_pool().check_is_known(tx_hash, IGNORE_BANNED).is_err() } } diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs index 605b2380c822..a06c051f0a7e 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs @@ -676,7 +676,7 @@ where active_views .iter() .chain(inactive_views.iter()) - .filter(|(_, view)| !view.is_imported(&replaced)) + .filter(|(_, view)| view.is_imported(&replaced)) .map(|(_, view)| { self.replace_transaction_in_view( view.clone(),