@@ -140,7 +140,7 @@ func TestKeeperTestSuite(t *testing.T) {
140
140
}
141
141
142
142
func (suite * KeeperTestSuite ) TestSetClientState () {
143
- clientState := ibctmtypes .NewClientState (testChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , types .ZeroHeight (), commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath )
143
+ clientState := ibctmtypes .NewClientState (testChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , types .ZeroHeight (), commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false )
144
144
suite .keeper .SetClientState (suite .ctx , testClientID , clientState )
145
145
146
146
retrievedState , found := suite .keeper .GetClientState (suite .ctx , testClientID )
@@ -169,12 +169,12 @@ func (suite *KeeperTestSuite) TestValidateSelfClient() {
169
169
}{
170
170
{
171
171
"success" ,
172
- ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
172
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false ),
173
173
true ,
174
174
},
175
175
{
176
176
"success with nil UpgradePath" ,
177
- ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), nil ),
177
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), nil , false , false ),
178
178
true ,
179
179
},
180
180
{
@@ -184,46 +184,47 @@ func (suite *KeeperTestSuite) TestValidateSelfClient() {
184
184
},
185
185
{
186
186
"frozen client" ,
187
- & ibctmtypes.ClientState {ChainId : suite .chainA .ChainID , TrustLevel : ibctmtypes .DefaultTrustLevel , TrustingPeriod : trustingPeriod , UnbondingPeriod : ubdPeriod , MaxClockDrift : maxClockDrift , FrozenHeight : testClientHeight , LatestHeight : testClientHeight , ProofSpecs : commitmenttypes .GetSDKSpecs (), UpgradePath : ibctesting .UpgradePath },
187
+ & ibctmtypes.ClientState {ChainId : suite .chainA .ChainID , TrustLevel : ibctmtypes .DefaultTrustLevel , TrustingPeriod : trustingPeriod , UnbondingPeriod : ubdPeriod , MaxClockDrift : maxClockDrift , FrozenHeight : testClientHeight , LatestHeight : testClientHeight , ProofSpecs : commitmenttypes .GetSDKSpecs (), UpgradePath : ibctesting .UpgradePath , AllowUpdateAfterExpiry : false , AllowUpdateAfterMisbehaviour : false },
188
188
false ,
189
189
},
190
190
{
191
191
"incorrect chainID" ,
192
- ibctmtypes .NewClientState ("gaiatestnet" , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
192
+ ibctmtypes .NewClientState ("gaiatestnet" , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false ),
193
193
false ,
194
194
},
195
195
{
196
196
"invalid client height" ,
197
- ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , types .NewHeight (0 , uint64 (suite .chainA .GetContext ().BlockHeight ())), commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
197
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , types .NewHeight (0 , uint64 (suite .chainA .GetContext ().BlockHeight ())), commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false ),
198
198
false ,
199
199
},
200
200
{
201
201
"invalid client revision" ,
202
- ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeightRevision1 , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
202
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeightRevision1 , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false ),
203
203
false ,
204
204
},
205
205
{
206
206
"invalid proof specs" ,
207
- ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , nil , ibctesting .UpgradePath ),
207
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , nil , ibctesting .UpgradePath , false , false ),
208
208
false ,
209
209
},
210
210
{
211
211
"invalid trust level" ,
212
- ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes.Fraction {0 , 1 }, trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ), false ,
212
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes.Fraction {Numerator : 0 , Denominator : 1 }, trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false ),
213
+ false ,
213
214
},
214
215
{
215
216
"invalid unbonding period" ,
216
- ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod + 10 , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
217
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod + 10 , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false ),
217
218
false ,
218
219
},
219
220
{
220
221
"invalid trusting period" ,
221
- ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , ubdPeriod + 10 , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
222
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , ubdPeriod + 10 , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false ),
222
223
false ,
223
224
},
224
225
{
225
226
"invalid upgrade path" ,
226
- ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), []string {"bad" , "upgrade" , "path" }),
227
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), []string {"bad" , "upgrade" , "path" }, false , false ),
227
228
false ,
228
229
},
229
230
}
@@ -243,9 +244,9 @@ func (suite KeeperTestSuite) TestGetAllGenesisClients() {
243
244
testClientID2 , testClientID3 , testClientID ,
244
245
}
245
246
expClients := []exported.ClientState {
246
- ibctmtypes .NewClientState (testChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , types .ZeroHeight (), commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
247
- ibctmtypes .NewClientState (testChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , types .ZeroHeight (), commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
248
- ibctmtypes .NewClientState (testChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , types .ZeroHeight (), commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
247
+ ibctmtypes .NewClientState (testChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , types .ZeroHeight (), commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false ),
248
+ ibctmtypes .NewClientState (testChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , types .ZeroHeight (), commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false ),
249
+ ibctmtypes .NewClientState (testChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , types .ZeroHeight (), commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false ),
249
250
}
250
251
251
252
expGenClients := make (types.IdentifiedClientStates , len (expClients ))
@@ -324,7 +325,7 @@ func (suite KeeperTestSuite) TestGetConsensusState() {
324
325
325
326
func (suite KeeperTestSuite ) TestConsensusStateHelpers () {
326
327
// initial setup
327
- clientState := ibctmtypes .NewClientState (testChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath )
328
+ clientState := ibctmtypes .NewClientState (testChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false )
328
329
329
330
suite .keeper .SetClientState (suite .ctx , testClientID , clientState )
330
331
suite .keeper .SetClientConsensusState (suite .ctx , testClientID , testClientHeight , suite .consensusState )
0 commit comments