-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: UX Mempool Tweaks #15121
chore: UX Mempool Tweaks #15121
Conversation
// i.e. the next valid transaction for the sender. If no such transaction exists, | ||
// nil will be returned. | ||
func (mp *SenderNonceMempool) NextSenderTx(sender string) sdk.Tx { | ||
senderIndex, ok := mp.senders[sender] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linter makes a good point, I'm somewhat distracted by differing receiver names too when reading code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, just nit where I'm only agreeing with the linter.
(cherry picked from commit 77660ec) # Conflicts: # types/mempool/priority_nonce.go # types/mempool/priority_nonce_test.go
Oh interesting, I didn't expect that approval to auto merge, I thought the linter was blocking a merge. |
@@ -183,7 +196,7 @@ func (snm *senderNonceMempool) Remove(tx sdk.Tx) error { | |||
} | |||
|
|||
sig := sigs[0] | |||
sender := sig.PubKey.Address().String() | |||
sender := sdk.AccAddress(sig.PubKey.Address()).String() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we shouldnt use bech32, this will move from being a global to local to auth. At least the mempool should not sue the global as a bare minimum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bech32 isn't going anywhere. When/if we figure out a tenable replacement for the global, that'll simple be passed into the mempool constructor just as it is anywhere else it's needed. Bech32 is the correct approach for sender indexes.
Yeah I didn't see that. I'll make a followup shortly |
@Mergifyio backport release/v0.47.x |
✅ Backports have been created
|
Co-authored-by: Aleksandr Bezobchuk <[email protected]> Co-authored-by: Aleksandr Bezobchuk <[email protected]>
Description
NextSenderTx
(I'm open to adding this to the interface)Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change