You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ICS29 PacketFee validation asserts that the relayers field must be nil. This causes packet fees with empty slices to fail validation.
Problem
We create PacketFee's with nil relayer fields (uninitialized slice), but JSON marshaling a PacketFee and unmarshaling it causes an empty slice to be created. Adding:
colin-axner
changed the title
ics29: PacketFee asserts relayers must be nil causing invalid PacketFee types after json marshaling/unmarshaling
PacketFee asserts relayers must be nil causing invalid PacketFee types after json marshaling/unmarshaling
Jul 25, 2022
Summary of Bug
ICS29 PacketFee validation asserts that the relayers field must be nil. This causes packet fees with empty slices to fail validation.
Problem
We create PacketFee's with nil relayer fields (uninitialized slice), but JSON marshaling a PacketFee and unmarshaling it causes an empty slice to be created. Adding:
to
29-fee/keeper/keeper_test.go#TestFeesInEscrow
causes:We can see the relayers field differs in each, one is
Relayers:[]string(nil)}
and the other isRelayers:[]string{}
I found this issue testing exporting/importing as importing failed basic validation since the packet fees exported were no longer considered valid
Solution
Treat empty
Relayers
slices as validFor Admin Use
The text was updated successfully, but these errors were encountered: