Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
This commit is contained in:
parent
73bdb7d190
commit
e07c1e20bc
|
@ -105,7 +105,7 @@ func GetCmdCreateClient(cdc *codec.Codec) *cobra.Command {
|
|||
case "simple":
|
||||
specs = []*ics23.ProofSpec{ics23.TendermintSpec}
|
||||
default:
|
||||
return fmt.Errorf("proof Spec: %s not supported", spc)
|
||||
return fmt.Errorf("proof spec: %s isn't supported", spc)
|
||||
}
|
||||
|
||||
msg := ibctmtypes.NewMsgCreateClient(
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package types_test
|
||||
|
||||
import (
|
||||
ics23 "github.com/confio/ics23/go"
|
||||
tmmath "github.com/tendermint/tendermint/libs/math"
|
||||
lite "github.com/tendermint/tendermint/lite2"
|
||||
|
||||
|
@ -60,6 +61,21 @@ func (suite *TendermintTestSuite) TestValidate() {
|
|||
clientState: ibctmtypes.NewClientState(testClientID, lite.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, ibctmtypes.Header{}, commitmenttypes.GetSDKSpecs()),
|
||||
expPass: false,
|
||||
},
|
||||
{
|
||||
name: "trusting period not less than unbonding period",
|
||||
clientState: ibctmtypes.NewClientState(testClientID, lite.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, suite.header, commitmenttypes.GetSDKSpecs()),
|
||||
expPass: false,
|
||||
},
|
||||
{
|
||||
name: "proof specs is nil",
|
||||
clientState: ibctmtypes.NewClientState(testClientID, lite.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, suite.header, nil),
|
||||
expPass: false,
|
||||
},
|
||||
{
|
||||
name: "proof specs contains nil",
|
||||
clientState: ibctmtypes.NewClientState(testClientID, lite.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, suite.header, []*ics23.ProofSpec{ics23.TendermintSpec, nil}),
|
||||
expPass: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
|
|
|
@ -33,6 +33,8 @@ func (suite *TendermintTestSuite) TestMsgCreateClientValidateBasic() {
|
|||
{ibctmtypes.NewMsgCreateClient(exported.ClientTypeTendermint, ibctmtypes.Header{}, lite.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, commitmenttypes.GetSDKSpecs(), signer), false, "nil header"},
|
||||
{ibctmtypes.NewMsgCreateClient(exported.ClientTypeTendermint, invalidHeader, lite.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, commitmenttypes.GetSDKSpecs(), signer), false, "invalid header"},
|
||||
{ibctmtypes.NewMsgCreateClient(exported.ClientTypeTendermint, suite.header, lite.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, []*ics23.ProofSpec{nil}, signer), false, "invalid proof specs"},
|
||||
{ibctmtypes.NewMsgCreateClient(exported.ClientTypeTendermint, suite.header, lite.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, nil, signer), false, "nil proof specs"},
|
||||
{ibctmtypes.NewMsgCreateClient(exported.ClientTypeTendermint, suite.header, lite.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, commitmenttypes.GetSDKSpecs(), signer), false, "trusting period not less than unbonding period"},
|
||||
}
|
||||
|
||||
for i, tc := range cases {
|
||||
|
|
Loading…
Reference in New Issue