-
Notifications
You must be signed in to change notification settings - Fork 672
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
testing: implement packet parsing from events in MsgSendPacketWithSender #8012
base: main
Are you sure you want to change the base?
Conversation
var sendResponse channeltypesv2.MsgSendPacketResponse | ||
err = proto.Unmarshal(msgResponse.Value, &sendResponse) | ||
if err != nil { | ||
return channeltypesv2.Packet{}, err |
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 needs to be implemented as a function as is specified in the original issue: #7856
clientv2types "github.com/cosmos/ibc-go/v10/modules/core/02-client/v2/types" | ||
channeltypesv2 "github.com/cosmos/ibc-go/v10/modules/core/04-channel/v2/types" | ||
hostv2 "github.com/cosmos/ibc-go/v10/modules/core/24-host/v2" | ||
) | ||
|
||
// ParsePacketFromEventsV2 parses a packet from events using the encoded packet hex attribute. |
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.
Please take a look at testing/events.go
. There is a ParsePacketFromEvents there. This one should be moved there.
channeltypesv2 "github.com/cosmos/ibc-go/v10/modules/core/04-channel/v2/types" | ||
) | ||
|
||
func TestParsePacketFromEventsV2(t *testing.T) { |
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.
Can you check the tests we have for the previous version of this in testing/events_test.go
and make sure we cover the same scenarios. Right off the bat, I see you are not testing what will happen if there are multiple packets in the events.
Implements packet parsing from events in MsgSendPacketWithSender function:
Closes #7856