From e7652c8051ceeacd01aa97592ff5069ab0bb885e Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Mon, 13 Jan 2025 15:21:29 -0500 Subject: [PATCH] use insert result to check existence Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> --- crates/transaction-pool/src/pool/pending.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/transaction-pool/src/pool/pending.rs b/crates/transaction-pool/src/pool/pending.rs index f551d34bbd06..f87a3d191a95 100644 --- a/crates/transaction-pool/src/pool/pending.rs +++ b/crates/transaction-pool/src/pool/pending.rs @@ -428,8 +428,7 @@ impl PendingPool { if !remove_locals && tx.transaction.is_local() { let sender_id = tx.transaction.sender_id(); - if !local_senders.contains(&sender_id) { - local_senders.insert(sender_id); + if local_senders.insert(&sender_id) { non_local_senders -= 1; } continue