Skip to content

Commit

Permalink
Calculating skipped txns in mempool accurately (#13831)
Browse files Browse the repository at this point in the history
* Avoid duplicate transactions in batch

* Addressing PR comments
  • Loading branch information
vusirikala committed Jun 27, 2024
1 parent 50dba28 commit 0d92186
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mempool/src/core_mempool/mempool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ impl Mempool {
// check if we can now include some transactions
// that were skipped before for given account
let mut skipped_txn = (txn.address, tx_seq + 1);
while skipped.contains(&skipped_txn) {
while skipped.remove(&skipped_txn) {
inserted.insert(skipped_txn);
result.push(skipped_txn);
if (result.len() as u64) == max_txns {
Expand Down

0 comments on commit 0d92186

Please sign in to comment.