Return result and acknowledgement from RelayPacket #2956
Labels
testing
Testing package and unit/integration tests
type: refactor
Architecture, code or CI improvements that may or may not tackle technical debt.
Milestone
Summary
Return result and acknowledgement from RelayPacket function for possibility of applying checks or further operations based on these values.
Problem Definition
I have found the RelayPacket function to be very useful for tests where the packet is parsed from events and then relayed. An example from this repository that served as inspiration is the following:
ibc-go/modules/apps/transfer/keeper/relay_test.go
Lines 223 to 230 in c86d27f
As my code has gotten more complex I have found myself wanting to relay packets that were committed on the counterparty chain as a result of a packet relayed on the original chain. For example, an interchain accounts transaction with a
MsgTransfer
will create a packet on the counterparty chain during the ICA host'sOnRecvPacket
.The way I see it, the easiest way to then relay this second packet would be to get a hold of the
OnRecvPacket
's events and look for the packet there. However theRelayPacket
function currently discards the result containing the events.So what I'm hoping for here is:
Proposal
From:
To:
For Admin Use
The text was updated successfully, but these errors were encountered: