@@ -41,10 +41,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
41
41
"valid fork misbehaviour" , func () {
42
42
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
43
43
44
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
45
- suite .Require ().True ( found )
44
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
45
+ suite .Require ().NoError ( err )
46
46
47
- err : = path .EndpointA .UpdateClient ()
47
+ err = path .EndpointA .UpdateClient ()
48
48
suite .Require ().NoError (err )
49
49
50
50
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -60,8 +60,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
60
60
"valid time misbehaviour" , func () {
61
61
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
62
62
63
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
64
- suite .Require ().True ( found )
63
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
64
+ suite .Require ().NoError ( err )
65
65
66
66
misbehaviour = & ibctm.Misbehaviour {
67
67
Header1 : suite .chainB .CreateTMClientHeader (suite .chainB .ChainID , suite .chainB .ProposedHeader .Height + 3 , trustedHeight , suite .chainB .ProposedHeader .Time , suite .chainB .Vals , suite .chainB .NextVals , trustedVals , suite .chainB .Signers ),
@@ -74,8 +74,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
74
74
"valid time misbehaviour, header 1 time strictly less than header 2 time" , func () {
75
75
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
76
76
77
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
78
- suite .Require ().True ( found )
77
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
78
+ suite .Require ().NoError ( err )
79
79
80
80
misbehaviour = & ibctm.Misbehaviour {
81
81
Header1 : suite .chainB .CreateTMClientHeader (suite .chainB .ChainID , suite .chainB .ProposedHeader .Height + 3 , trustedHeight , suite .chainB .ProposedHeader .Time , suite .chainB .Vals , suite .chainB .NextVals , trustedVals , suite .chainB .Signers ),
@@ -88,8 +88,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
88
88
"valid misbehavior at height greater than last consensusState" , func () {
89
89
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
90
90
91
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
92
- suite .Require ().True ( found )
91
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
92
+ suite .Require ().NoError ( err )
93
93
94
94
misbehaviour = & ibctm.Misbehaviour {
95
95
Header1 : suite .chainB .CreateTMClientHeader (suite .chainB .ChainID , suite .chainB .ProposedHeader .Height + 1 , trustedHeight , suite .chainB .ProposedHeader .Time , suite .chainB .Vals , suite .chainB .NextVals , trustedVals , suite .chainB .Signers ),
@@ -101,16 +101,16 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
101
101
"valid misbehaviour with different trusted heights" , func () {
102
102
trustedHeight1 := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
103
103
104
- trustedVals1 , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight1 .RevisionHeight ))
105
- suite .Require ().True ( found )
104
+ trustedVals1 , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight1 .RevisionHeight ))
105
+ suite .Require ().NoError ( err )
106
106
107
- err : = path .EndpointA .UpdateClient ()
107
+ err = path .EndpointA .UpdateClient ()
108
108
suite .Require ().NoError (err )
109
109
110
110
trustedHeight2 := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
111
111
112
- trustedVals2 , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight2 .RevisionHeight ))
113
- suite .Require ().True ( found )
112
+ trustedVals2 , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight2 .RevisionHeight ))
113
+ suite .Require ().NoError ( err )
114
114
115
115
misbehaviour = & ibctm.Misbehaviour {
116
116
Header1 : suite .chainB .CreateTMClientHeader (suite .chainB .ChainID , suite .chainB .ProposedHeader .Height , trustedHeight1 , suite .chainB .ProposedHeader .Time .Add (time .Minute ), suite .chainB .Vals , suite .chainB .NextVals , trustedVals1 , suite .chainB .Signers ),
@@ -123,10 +123,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
123
123
"valid misbehaviour at a previous revision" , func () {
124
124
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
125
125
126
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
127
- suite .Require ().True ( found )
126
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
127
+ suite .Require ().NoError ( err )
128
128
129
- err : = path .EndpointA .UpdateClient ()
129
+ err = path .EndpointA .UpdateClient ()
130
130
suite .Require ().NoError (err )
131
131
132
132
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -146,8 +146,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
146
146
"valid misbehaviour at a future revision" , func () {
147
147
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
148
148
149
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
150
- suite .Require ().True ( found )
149
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
150
+ suite .Require ().NoError ( err )
151
151
152
152
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
153
153
@@ -164,8 +164,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
164
164
"valid misbehaviour with trusted heights at a previous revision" , func () {
165
165
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
166
166
167
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
168
- suite .Require ().True ( found )
167
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
168
+ suite .Require ().NoError ( err )
169
169
170
170
// increment revision of chainID
171
171
err = path .EndpointB .UpgradeChain ()
@@ -184,10 +184,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
184
184
"consensus state's valset hash different from misbehaviour should still pass" , func () {
185
185
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
186
186
187
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
188
- suite .Require ().True ( found )
187
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
188
+ suite .Require ().NoError ( err )
189
189
190
- err : = path .EndpointA .UpdateClient ()
190
+ err = path .EndpointA .UpdateClient ()
191
191
suite .Require ().NoError (err )
192
192
193
193
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -207,10 +207,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
207
207
"invalid misbehaviour: misbehaviour from different chain" , func () {
208
208
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
209
209
210
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
211
- suite .Require ().True ( found )
210
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
211
+ suite .Require ().NoError ( err )
212
212
213
- err : = path .EndpointA .UpdateClient ()
213
+ err = path .EndpointA .UpdateClient ()
214
214
suite .Require ().NoError (err )
215
215
216
216
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -240,8 +240,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
240
240
"trusted consensus state does not exist" , func () {
241
241
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
242
242
243
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
244
- suite .Require ().True ( found )
243
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
244
+ suite .Require ().NoError ( err )
245
245
246
246
misbehaviour = & ibctm.Misbehaviour {
247
247
Header1 : suite .chainB .CreateTMClientHeader (suite .chainB .ChainID , suite .chainB .ProposedHeader .Height , trustedHeight .Increment ().(clienttypes.Height ), suite .chainB .ProposedHeader .Time .Add (time .Minute ), suite .chainB .Vals , suite .chainB .NextVals , trustedVals , suite .chainB .Signers ),
@@ -258,10 +258,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
258
258
"trusting period expired" , func () {
259
259
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
260
260
261
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
262
- suite .Require ().True ( found )
261
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
262
+ suite .Require ().NoError ( err )
263
263
264
- err : = path .EndpointA .UpdateClient ()
264
+ err = path .EndpointA .UpdateClient ()
265
265
suite .Require ().NoError (err )
266
266
267
267
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -278,10 +278,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
278
278
"header 1 valset has too much change" , func () {
279
279
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
280
280
281
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
282
- suite .Require ().True ( found )
281
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
282
+ suite .Require ().NoError ( err )
283
283
284
- err : = path .EndpointA .UpdateClient ()
284
+ err = path .EndpointA .UpdateClient ()
285
285
suite .Require ().NoError (err )
286
286
287
287
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -296,10 +296,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
296
296
"header 2 valset has too much change" , func () {
297
297
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
298
298
299
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
300
- suite .Require ().True ( found )
299
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
300
+ suite .Require ().NoError ( err )
301
301
302
- err : = path .EndpointA .UpdateClient ()
302
+ err = path .EndpointA .UpdateClient ()
303
303
suite .Require ().NoError (err )
304
304
305
305
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -314,10 +314,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
314
314
"both header 1 and header 2 valsets have too much change" , func () {
315
315
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
316
316
317
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
318
- suite .Require ().True ( found )
317
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
318
+ suite .Require ().NoError ( err )
319
319
320
- err : = path .EndpointA .UpdateClient ()
320
+ err = path .EndpointA .UpdateClient ()
321
321
suite .Require ().NoError (err )
322
322
323
323
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -389,10 +389,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
389
389
"valid fork misbehaviour" , func () {
390
390
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
391
391
392
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
393
- suite .Require ().True ( found )
392
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
393
+ suite .Require ().NoError ( err )
394
394
395
- err : = path .EndpointA .UpdateClient ()
395
+ err = path .EndpointA .UpdateClient ()
396
396
suite .Require ().NoError (err )
397
397
398
398
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -408,8 +408,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
408
408
"valid time misbehaviour" , func () {
409
409
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
410
410
411
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
412
- suite .Require ().True ( found )
411
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
412
+ suite .Require ().NoError ( err )
413
413
414
414
misbehaviour = & ibctm.Misbehaviour {
415
415
Header1 : suite .chainB .CreateTMClientHeader (suite .chainB .ChainID , suite .chainB .ProposedHeader .Height + 3 , trustedHeight , suite .chainB .ProposedHeader .Time , suite .chainB .Vals , suite .chainB .NextVals , trustedVals , suite .chainB .Signers ),
@@ -422,8 +422,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
422
422
"valid time misbehaviour, header 1 time strictly less than header 2 time" , func () {
423
423
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
424
424
425
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
426
- suite .Require ().True ( found )
425
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
426
+ suite .Require ().NoError ( err )
427
427
428
428
misbehaviour = & ibctm.Misbehaviour {
429
429
Header1 : suite .chainB .CreateTMClientHeader (suite .chainB .ChainID , suite .chainB .ProposedHeader .Height + 3 , trustedHeight , suite .chainB .ProposedHeader .Time , suite .chainB .Vals , suite .chainB .NextVals , trustedVals , suite .chainB .Signers ),
@@ -436,8 +436,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
436
436
"valid misbehavior at height greater than last consensusState" , func () {
437
437
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
438
438
439
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
440
- suite .Require ().True ( found )
439
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
440
+ suite .Require ().NoError ( err )
441
441
442
442
misbehaviour = & ibctm.Misbehaviour {
443
443
Header1 : suite .chainB .CreateTMClientHeader (suite .chainB .ChainID , suite .chainB .ProposedHeader .Height + 1 , trustedHeight , suite .chainB .ProposedHeader .Time , suite .chainB .Vals , suite .chainB .NextVals , trustedVals , suite .chainB .Signers ),
@@ -449,16 +449,16 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
449
449
"valid misbehaviour with different trusted heights" , func () {
450
450
trustedHeight1 := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
451
451
452
- trustedVals1 , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight1 .RevisionHeight ))
453
- suite .Require ().True ( found )
452
+ trustedVals1 , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight1 .RevisionHeight ))
453
+ suite .Require ().NoError ( err )
454
454
455
- err : = path .EndpointA .UpdateClient ()
455
+ err = path .EndpointA .UpdateClient ()
456
456
suite .Require ().NoError (err )
457
457
458
458
trustedHeight2 := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
459
459
460
- trustedVals2 , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight2 .RevisionHeight ))
461
- suite .Require ().True ( found )
460
+ trustedVals2 , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight2 .RevisionHeight ))
461
+ suite .Require ().NoError ( err )
462
462
463
463
misbehaviour = & ibctm.Misbehaviour {
464
464
Header1 : suite .chainB .CreateTMClientHeader (suite .chainB .ChainID , suite .chainB .ProposedHeader .Height , trustedHeight1 , suite .chainB .ProposedHeader .Time .Add (time .Minute ), suite .chainB .Vals , suite .chainB .NextVals , trustedVals1 , suite .chainB .Signers ),
@@ -471,10 +471,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
471
471
"consensus state's valset hash different from misbehaviour should still pass" , func () {
472
472
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
473
473
474
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
475
- suite .Require ().True ( found )
474
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
475
+ suite .Require ().NoError ( err )
476
476
477
- err : = path .EndpointA .UpdateClient ()
477
+ err = path .EndpointA .UpdateClient ()
478
478
suite .Require ().NoError (err )
479
479
480
480
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -494,10 +494,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
494
494
"invalid misbehaviour: misbehaviour from different chain" , func () {
495
495
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
496
496
497
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
498
- suite .Require ().True ( found )
497
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
498
+ suite .Require ().NoError ( err )
499
499
500
- err : = path .EndpointA .UpdateClient ()
500
+ err = path .EndpointA .UpdateClient ()
501
501
suite .Require ().NoError (err )
502
502
503
503
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -512,7 +512,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
512
512
"misbehaviour trusted validators does not match validator hash in trusted consensus state" , func () {
513
513
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
514
514
515
- err : = path .EndpointA .UpdateClient ()
515
+ err = path .EndpointA .UpdateClient ()
516
516
suite .Require ().NoError (err )
517
517
518
518
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -527,8 +527,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
527
527
"trusted consensus state does not exist" , func () {
528
528
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
529
529
530
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
531
- suite .Require ().True ( found )
530
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
531
+ suite .Require ().NoError ( err )
532
532
533
533
misbehaviour = & ibctm.Misbehaviour {
534
534
Header1 : suite .chainB .CreateTMClientHeader (suite .chainB .ChainID , suite .chainB .ProposedHeader .Height , trustedHeight .Increment ().(clienttypes.Height ), suite .chainB .ProposedHeader .Time .Add (time .Minute ), suite .chainB .Vals , suite .chainB .NextVals , trustedVals , suite .chainB .Signers ),
@@ -545,10 +545,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
545
545
"trusting period expired" , func () {
546
546
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
547
547
548
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
549
- suite .Require ().True ( found )
548
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
549
+ suite .Require ().NoError ( err )
550
550
551
- err : = path .EndpointA .UpdateClient ()
551
+ err = path .EndpointA .UpdateClient ()
552
552
suite .Require ().NoError (err )
553
553
554
554
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -565,10 +565,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
565
565
"header 1 valset has too much change" , func () {
566
566
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
567
567
568
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
569
- suite .Require ().True ( found )
568
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
569
+ suite .Require ().NoError ( err )
570
570
571
- err : = path .EndpointA .UpdateClient ()
571
+ err = path .EndpointA .UpdateClient ()
572
572
suite .Require ().NoError (err )
573
573
574
574
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -583,10 +583,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
583
583
"header 2 valset has too much change" , func () {
584
584
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
585
585
586
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
587
- suite .Require ().True ( found )
586
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
587
+ suite .Require ().NoError ( err )
588
588
589
- err : = path .EndpointA .UpdateClient ()
589
+ err = path .EndpointA .UpdateClient ()
590
590
suite .Require ().NoError (err )
591
591
592
592
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
@@ -601,10 +601,10 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
601
601
"both header 1 and header 2 valsets have too much change" , func () {
602
602
trustedHeight := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
603
603
604
- trustedVals , found := suite .chainB .GetValsAtHeight (int64 (trustedHeight .RevisionHeight ))
605
- suite .Require ().True ( found )
604
+ trustedVals , err := suite .chainB .GetTrustedValidators (int64 (trustedHeight .RevisionHeight ))
605
+ suite .Require ().NoError ( err )
606
606
607
- err : = path .EndpointA .UpdateClient ()
607
+ err = path .EndpointA .UpdateClient ()
608
608
suite .Require ().NoError (err )
609
609
610
610
height := path .EndpointA .GetClientState ().GetLatestHeight ().(clienttypes.Height )
0 commit comments