-
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(eureka): fix condition in commit packet, added test for zero timeout height #7109
Conversation
…hange some error messages and add some more comments
@@ -67,7 +67,7 @@ func commitV2Packet(packet Packet) []byte { | |||
timeoutBuf := sdk.Uint64ToBigEndian(packet.GetTimeoutTimestamp()) | |||
|
|||
// only hash the timeout height if it is non-zero. This will allow us to remove it entirely in the future | |||
if timeoutHeight.EQ(clienttypes.ZeroHeight()) { | |||
if !timeoutHeight.EQ(clienttypes.ZeroHeight()) { |
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.
This is the most important fix in the PR.
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, seems like it was missed after the suggestion, great eye!
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.
these look right to me, nicely caught the conditional!
@@ -67,7 +67,7 @@ func commitV2Packet(packet Packet) []byte { | |||
timeoutBuf := sdk.Uint64ToBigEndian(packet.GetTimeoutTimestamp()) | |||
|
|||
// only hash the timeout height if it is non-zero. This will allow us to remove it entirely in the future | |||
if timeoutHeight.EQ(clienttypes.ZeroHeight()) { | |||
if !timeoutHeight.EQ(clienttypes.ZeroHeight()) { |
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, seems like it was missed after the suggestion, great eye!
Quality Gate passed for 'ibc-go'Issues Measures |
Description
commitV2Packet
where timeout height should be hashed only if not empty.closes: #XXXX
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.