Skip to content
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

WIP: Fix ICS23-Proofs #6178

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
Update x/ibc/07-tendermint/types/msgs.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
  • Loading branch information
AdityaSripal and fedekunze authored May 19, 2020
commit 2da7b0d1c68edaa8bed212419edeb217a1ebdb79
9 changes: 7 additions & 2 deletions x/ibc/07-tendermint/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,13 @@ func (msg MsgCreateClient) ValidateBasic() error {
if err := msg.Header.ValidateBasic(msg.Header.ChainID); err != nil {
return sdkerrors.Wrapf(ErrInvalidHeader, "header failed validatebasic with its own chain-id: %v", err)
}
if msg.ProofSpecs != nil {
return sdkerrors.Wrap(ErrInvalidProofSpecs, "proof specs cannot be nil for tendermint client")
if len(msg.ProofSpecs) == 0 {
return sdkerrors.Wrap(ErrInvalidProofSpecs, "proof specs cannot be empty for tendermint client")
}
for i, ps := range msg.ProofSpecs {
if ps == nil {
return fmt.Errorf("proof spec %d cannot be nil", i)
}
}
return host.DefaultClientIdentifierValidator(msg.ClientID)
}
Expand Down