-
Notifications
You must be signed in to change notification settings - Fork 122
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
fix!: revert recent consumer packet data changes #1150
Conversation
Is this in |
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.
Confirming that this does not affect any existing releases as changes were only available in main
.
The Protobuf/break-check
is expected.
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
@@ -606,9 +606,29 @@ func (k Keeper) getAndIncrementPendingPacketsIdx(ctx sdk.Context) (toReturn uint | |||
return toReturn | |||
} | |||
|
|||
// GetPendingPackets returns ALL the pending CCV packets from the store | |||
// GetPendingPackets returns ALL the pending CCV packets from the store without indexes. | |||
func (k Keeper) GetPendingPackets(ctx sdk.Context) []ccv.ConsumerPacketData { |
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 could get rid of this method, it'd just make the PR a lot larger
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
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!
* revert changes * lint * Update CHANGELOG.md * wrapper type
Description
#1037 included the addition of an
idx
field to theccv.ConsumerPacketData
type, see this comment. After developing more, it turns out the addition of the idx field breaks the wire, since the ConsumerPacketData type is used for JSON serialization here. This PR reverts the addition of the idx field to ConsumerPacketData.To allow pending packet deletion (by idx) in the consumer's
SendPackets
method, we introduce a new wrapper typeConsumerPacketDataWithIdx
which is only used for the new keeper method,GetAllPendingPacketsWithIdx
. This allows us to leaveccv.ConsumerPacketData
unchanged.Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if state-machine breaking change (i.e., requires coordinated upgrade)CHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change