-
Notifications
You must be signed in to change notification settings - Fork 637
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: add paginated packet commitments query to channel/v2 #7533
feat: add paginated packet commitments query to channel/v2 #7533
Conversation
sequence := sdk.BigEndianToUint64([]byte(keySplit[len(keySplit)-1])) | ||
if sequence == 0 { | ||
return types.ErrInvalidPacket | ||
} |
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 must be handled different to in v1 as we encode the sequence as big endian bytes when storing commitments.
If parsing the keypart as big endian uint64 fails then it will return 0 - an invalid packet sequence, and is the result of corrupted state.
will fix conflicts, take on review and merge while Damian's on holiday (and if any nit pops up will push) |
Quality Gate passed for 'ibc-go'Issues Measures |
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.
lgtm!
Description
Adds paginated queries for packet commitments in channel/v2.
This will be needed for relayers who will also want to query unreceived packets as packets sent must be first queried for their commitments on a source.
ref: #7478
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.