-
Notifications
You must be signed in to change notification settings - Fork 625
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(core/eureka): add recv handler #7041
Conversation
if !ok { | ||
return channeltypes.ErrChannelNotFound | ||
} | ||
if counterparty.ClientId != packet.SourceChannel { |
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.
removed the check for clientID == "", it is validated as non-empty in counterparty.Validate
|
||
commitment := channeltypes.CommitPacket(packet) | ||
|
||
if err := k.clientKeeper.VerifyMembership( |
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.
directly use client keeper method now instead of look-up of lcm and call (which also does status check)
return err | ||
} | ||
|
||
// REPLAY PROTECTION: Packet receipts will indicate that a packet has already been received |
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.
add replay protection which was missing
// is received for a certain sequence and for all duplicate receives. | ||
func emitRecvPacketEvent(ctx sdk.Context, packet types.Packet, channel types.Channel) { | ||
func EmitRecvPacketEvent(ctx sdk.Context, packet types.Packet, channel *types.Channel) { |
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.
think these event funcs should eventually be moved in an internal go package further up the source code tree and be re-used by both 04-channel and the eureka handling code
|
||
func (k Keeper) RecvPacket( | ||
ctx sdk.Context, | ||
_ *capabilitytypes.Capability, |
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.
soon to be rm'ed in port router refactor
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.
utACK
db933cb
to
d8a7adc
Compare
d8a7adc
to
7c982ec
Compare
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.
Minor nits, approving so you can address what makes sense to address and then merge
Quality Gate passed for 'ibc-go'Issues Measures |
Description
closes: #6968
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.