Skip to content

Commit

Permalink
fix the issues identified by code review in#PR116
Browse files Browse the repository at this point in the history
  • Loading branch information
TimmyExogenous committed Aug 20, 2024
1 parent 60c3f17 commit 0f1e24b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions x/assets/types/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ func (gs GenesisState) Validate() error {
i, info.MetaInfo, MaxChainTokenMetaInfoLength,
)
}
if info.MetaInfo == "" || len(info.MetaInfo) > MaxChainMetaInfoLength {
return errorsmod.Wrapf(
ErrInvalidGenesisData,
"nil meta info or too long for chain %d, maxLength:%d",
i, MaxChainMetaInfoLength,
)
}
// this is our primary method of cross-chain communication.
if info.LayerZeroChainID == 0 {
return errorsmod.Wrapf(
Expand Down

0 comments on commit 0f1e24b

Please sign in to comment.