Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
refactor(mempool)!: match server/v2/cometbft and sdk mempool interface #21744
refactor(mempool)!: match server/v2/cometbft and sdk mempool interface #21744
Changes from 5 commits
741842f
55edf6c
6c1ca6d
f2eb295
c355618
94c6858
99ff2a4
d3ccd44
efd4be2
572ec03
1990634
c3ed1fa
ee627c9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Complete the implementation of the
SelectBy
function.The
SelectBy
function has been added to facilitate the selection of transactions based on a predicate. However, the current implementation is empty.Please complete the function logic to ensure it behaves as expected when called. Consider iterating over the input transactions and applying the predicate to each transaction to determine which ones should be selected.
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.
why the change here?
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.
As otherwise in server/v2 we would decode twice if the mempool implementation decodes the txs (ours do not, but we cannot know about users):
https://github.com/cosmos/cosmos-sdk/blob/95b8092/server/v2/cometbft/handlers/defaults.go#L52
https://github.com/cosmos/cosmos-sdk/blob/95b8092/server/v2/cometbft/handlers/defaults.go#L72
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.
Should we use a generic instead of either
[]byte
orsdk.Tx
? if we usesdk.Tx
how will this work with server/v2?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.
err.. this interface is only used for app v1 correct?
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.
Yea, the one of server/v2 is identical but use generic