Skip to content

Commit

Permalink
is_imported: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkucharczyk committed Nov 14, 2024
1 parent d69c660 commit b47b174
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<ChainApi>) -> 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()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit b47b174

Please sign in to comment.