-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat(v1): [ENG-790] Implementing vote extension handlers #103
Conversation
…into terpay/vote-handlers
abci/vote_extensions.go
Outdated
// Validate the auction transaction and cache result | ||
if err := h.verifyAuctionTx(ctx, bidTx); err != nil { | ||
h.cache[hash] = err | ||
} else { | ||
h.cache[hash] = nil |
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're need to check and set the cache in VerifyVoteExtension
, not ExtendVote
. The cache is so we don't verify the same vote ext twice.
Also note, CometBFT will never call ExtendVote
and VerifyVoteExtension
on the same client :)
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.
Ah, i was under the assumption that it might call it both on the same client so caching on both sides made sense. Will remove.
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.
Nice work!
Just let one minor comment.
abci/vote_extensions.go
Outdated
// RemoveTx removes a transaction from the application-side mempool. | ||
func (h *VoteExtensionHandler) RemoveTx(tx sdk.Tx) { |
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.
Remove this :)
No description provided.