-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move IBC packet data interpretation to the application module
This also adds a channelexported.NewOpaquePacketData(rawBytes) implementation to assist apps in being able to manipulate the raw packet data using the codec layer.
- Loading branch information
1 parent
3b48464
commit b5070a4
Showing
20 changed files
with
210 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package exported | ||
|
||
// OpaquePacketData is useful as a struct for when a Keeper cannot | ||
// unmarshal an IBC packet. | ||
type OpaquePacketData struct { | ||
data []byte | ||
} | ||
|
||
// NewOpaquePacketData creates a wrapper for rawData. | ||
func NewOpaquePacketData(data []byte) OpaquePacketData { | ||
return OpaquePacketData{ | ||
data: data, | ||
} | ||
} | ||
|
||
// GetData is a helper for serialising | ||
func (opd OpaquePacketData) GetData() []byte { | ||
return opd.data | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.