@@ -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 , false , false )
143
+ clientState := ibctmtypes .NewClientState (testChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , types .ZeroHeight (), commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath )
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 , false , false ),
172
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
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 , false , false ),
177
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), nil ),
178
178
true ,
179
179
},
180
180
{
@@ -184,47 +184,46 @@ 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 , AllowUpdateAfterExpiry : false , AllowUpdateAfterMisbehaviour : false },
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 },
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 , false , false ),
192
+ ibctmtypes .NewClientState ("gaiatestnet" , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
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 , false , false ),
197
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , types .NewHeight (0 , uint64 (suite .chainA .GetContext ().BlockHeight ())), commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
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 , false , false ),
202
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeightRevision1 , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
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 , false , false ),
207
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , nil , ibctesting .UpgradePath ),
208
208
false ,
209
209
},
210
210
{
211
211
"invalid trust level" ,
212
- ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes.Fraction {Numerator : 0 , Denominator : 1 }, trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false ),
213
- false ,
212
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes.Fraction {0 , 1 }, trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ), false ,
214
213
},
215
214
{
216
215
"invalid unbonding period" ,
217
- ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod + 10 , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false ),
216
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod + 10 , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
218
217
false ,
219
218
},
220
219
{
221
220
"invalid trusting period" ,
222
- ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , ubdPeriod + 10 , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false ),
221
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , ubdPeriod + 10 , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath ),
223
222
false ,
224
223
},
225
224
{
226
225
"invalid upgrade path" ,
227
- ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), []string {"bad" , "upgrade" , "path" }, false , false ),
226
+ ibctmtypes .NewClientState (suite .chainA .ChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), []string {"bad" , "upgrade" , "path" }),
228
227
false ,
229
228
},
230
229
}
@@ -244,9 +243,9 @@ func (suite KeeperTestSuite) TestGetAllGenesisClients() {
244
243
testClientID2 , testClientID3 , testClientID ,
245
244
}
246
245
expClients := []exported.ClientState {
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 ),
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 ),
250
249
}
251
250
252
251
expGenClients := make (types.IdentifiedClientStates , len (expClients ))
@@ -325,7 +324,7 @@ func (suite KeeperTestSuite) TestGetConsensusState() {
325
324
326
325
func (suite KeeperTestSuite ) TestConsensusStateHelpers () {
327
326
// initial setup
328
- clientState := ibctmtypes .NewClientState (testChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath , false , false )
327
+ clientState := ibctmtypes .NewClientState (testChainID , ibctmtypes .DefaultTrustLevel , trustingPeriod , ubdPeriod , maxClockDrift , testClientHeight , commitmenttypes .GetSDKSpecs (), ibctesting .UpgradePath )
329
328
330
329
suite .keeper .SetClientState (suite .ctx , testClientID , clientState )
331
330
suite .keeper .SetClientConsensusState (suite .ctx , testClientID , testClientHeight , suite .consensusState )
0 commit comments