Skip to content

Conversation

@thomas-nguy
Copy link
Contributor

Description

Closes: #XXXX

If a transaction is replaced in the priority nonce mempool, we must also remove the sender’s indices associated with the old transaction. The missing cleanup step leads to significant bugs during priority nonce mempool testing.

@thomas-nguy thomas-nguy force-pushed the thomas/fix-priority-nonce branch from e2c5dc5 to c254a83 Compare November 17, 2025 01:25
@thomas-nguy thomas-nguy force-pushed the thomas/fix-priority-nonce branch from c254a83 to 26a74c7 Compare November 17, 2025 01:26

iter := mp.Select(ctx, nil)
require.Equal(t, txs[3], iter.Tx())
require.Equal(t, txs[5], iter.Tx())
Copy link
Contributor Author

@thomas-nguy thomas-nguy Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don’t properly clear the sender index, tx[4] wil be returned here even though it should have been replaced and removed

tx[5] should be returned in any cases because it has the higher priority

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant