@@ -42,8 +42,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
4242 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
4343 suite .Require ().True (ok )
4444
45- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
46- suite .Require ().NoError ( err )
45+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
46+ suite .Require ().True ( ok )
4747
4848 err = path .EndpointA .UpdateClient ()
4949 suite .Require ().NoError (err )
@@ -63,8 +63,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
6363 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
6464 suite .Require ().True (ok )
6565
66- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
67- suite .Require ().NoError ( err )
66+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
67+ suite .Require ().True ( ok )
6868
6969 misbehaviour = & ibctm.Misbehaviour {
7070 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 ),
@@ -78,8 +78,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
7878 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
7979 suite .Require ().True (ok )
8080
81- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
82- suite .Require ().NoError ( err )
81+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
82+ suite .Require ().True ( ok )
8383
8484 misbehaviour = & ibctm.Misbehaviour {
8585 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 ),
@@ -93,8 +93,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
9393 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
9494 suite .Require ().True (ok )
9595
96- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
97- suite .Require ().NoError ( err )
96+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
97+ suite .Require ().True ( ok )
9898
9999 misbehaviour = & ibctm.Misbehaviour {
100100 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 ),
@@ -107,17 +107,17 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
107107 trustedHeight1 , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
108108 suite .Require ().True (ok )
109109
110- trustedVals1 , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight1 .RevisionHeight ))
111- suite .Require ().NoError ( err )
110+ trustedVals1 , ok := suite .chainB .TrustedValidators [ trustedHeight1 .RevisionHeight ]
111+ suite .Require ().True ( ok )
112112
113113 err = path .EndpointA .UpdateClient ()
114114 suite .Require ().NoError (err )
115115
116116 trustedHeight2 , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
117117 suite .Require ().True (ok )
118118
119- trustedVals2 , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight2 .RevisionHeight ))
120- suite .Require ().NoError ( err )
119+ trustedVals2 , ok := suite .chainB .TrustedValidators [ trustedHeight2 .RevisionHeight ]
120+ suite .Require ().True ( ok )
121121
122122 misbehaviour = & ibctm.Misbehaviour {
123123 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 ),
@@ -131,8 +131,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
131131 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
132132 suite .Require ().True (ok )
133133
134- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
135- suite .Require ().NoError ( err )
134+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
135+ suite .Require ().True ( ok )
136136
137137 err = path .EndpointA .UpdateClient ()
138138 suite .Require ().NoError (err )
@@ -156,8 +156,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
156156 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
157157 suite .Require ().True (ok )
158158
159- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
160- suite .Require ().NoError ( err )
159+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
160+ suite .Require ().True ( ok )
161161
162162 height , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
163163 suite .Require ().True (ok )
@@ -176,8 +176,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
176176 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
177177 suite .Require ().True (ok )
178178
179- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
180- suite .Require ().NoError ( err )
179+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
180+ suite .Require ().True ( ok )
181181
182182 // increment revision of chainID
183183 err = path .EndpointB .UpgradeChain ()
@@ -198,8 +198,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
198198 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
199199 suite .Require ().True (ok )
200200
201- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
202- suite .Require ().NoError ( err )
201+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
202+ suite .Require ().True ( ok )
203203
204204 err = path .EndpointA .UpdateClient ()
205205 suite .Require ().NoError (err )
@@ -223,8 +223,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
223223 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
224224 suite .Require ().True (ok )
225225
226- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
227- suite .Require ().NoError ( err )
226+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
227+ suite .Require ().True ( ok )
228228
229229 err = path .EndpointA .UpdateClient ()
230230 suite .Require ().NoError (err )
@@ -260,8 +260,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
260260 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
261261 suite .Require ().True (ok )
262262
263- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
264- suite .Require ().NoError ( err )
263+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
264+ suite .Require ().True ( ok )
265265
266266 misbehaviour = & ibctm.Misbehaviour {
267267 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 ),
@@ -279,8 +279,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
279279 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
280280 suite .Require ().True (ok )
281281
282- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
283- suite .Require ().NoError ( err )
282+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
283+ suite .Require ().True ( ok )
284284
285285 err = path .EndpointA .UpdateClient ()
286286 suite .Require ().NoError (err )
@@ -301,8 +301,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
301301 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
302302 suite .Require ().True (ok )
303303
304- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
305- suite .Require ().NoError ( err )
304+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
305+ suite .Require ().True ( ok )
306306
307307 err = path .EndpointA .UpdateClient ()
308308 suite .Require ().NoError (err )
@@ -321,8 +321,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
321321 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
322322 suite .Require ().True (ok )
323323
324- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
325- suite .Require ().NoError ( err )
324+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
325+ suite .Require ().True ( ok )
326326
327327 err = path .EndpointA .UpdateClient ()
328328 suite .Require ().NoError (err )
@@ -341,8 +341,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() {
341341 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
342342 suite .Require ().True (ok )
343343
344- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
345- suite .Require ().NoError ( err )
344+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
345+ suite .Require ().True ( ok )
346346
347347 err = path .EndpointA .UpdateClient ()
348348 suite .Require ().NoError (err )
@@ -418,8 +418,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
418418 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
419419 suite .Require ().True (ok )
420420
421- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
422- suite .Require ().NoError ( err )
421+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
422+ suite .Require ().True ( ok )
423423
424424 err = path .EndpointA .UpdateClient ()
425425 suite .Require ().NoError (err )
@@ -439,8 +439,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
439439 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
440440 suite .Require ().True (ok )
441441
442- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
443- suite .Require ().NoError ( err )
442+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
443+ suite .Require ().True ( ok )
444444
445445 misbehaviour = & ibctm.Misbehaviour {
446446 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 ),
@@ -454,8 +454,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
454454 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
455455 suite .Require ().True (ok )
456456
457- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
458- suite .Require ().NoError ( err )
457+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
458+ suite .Require ().True ( ok )
459459
460460 misbehaviour = & ibctm.Misbehaviour {
461461 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 ),
@@ -469,8 +469,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
469469 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
470470 suite .Require ().True (ok )
471471
472- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
473- suite .Require ().NoError ( err )
472+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
473+ suite .Require ().True ( ok )
474474
475475 misbehaviour = & ibctm.Misbehaviour {
476476 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 ),
@@ -483,17 +483,17 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
483483 trustedHeight1 , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
484484 suite .Require ().True (ok )
485485
486- trustedVals1 , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight1 .RevisionHeight ))
487- suite .Require ().NoError ( err )
486+ trustedVals1 , ok := suite .chainB .TrustedValidators [ trustedHeight1 .RevisionHeight ]
487+ suite .Require ().True ( ok )
488488
489489 err = path .EndpointA .UpdateClient ()
490490 suite .Require ().NoError (err )
491491
492492 trustedHeight2 , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
493493 suite .Require ().True (ok )
494494
495- trustedVals2 , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight2 .RevisionHeight ))
496- suite .Require ().NoError ( err )
495+ trustedVals2 , ok := suite .chainB .TrustedValidators [ trustedHeight2 .RevisionHeight ]
496+ suite .Require ().True ( ok )
497497
498498 misbehaviour = & ibctm.Misbehaviour {
499499 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 ),
@@ -507,8 +507,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
507507 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
508508 suite .Require ().True (ok )
509509
510- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
511- suite .Require ().NoError ( err )
510+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
511+ suite .Require ().True ( ok )
512512
513513 err = path .EndpointA .UpdateClient ()
514514 suite .Require ().NoError (err )
@@ -532,8 +532,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
532532 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
533533 suite .Require ().True (ok )
534534
535- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
536- suite .Require ().NoError ( err )
535+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
536+ suite .Require ().True ( ok )
537537
538538 err = path .EndpointA .UpdateClient ()
539539 suite .Require ().NoError (err )
@@ -569,8 +569,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
569569 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
570570 suite .Require ().True (ok )
571571
572- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
573- suite .Require ().NoError ( err )
572+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
573+ suite .Require ().True ( ok )
574574
575575 misbehaviour = & ibctm.Misbehaviour {
576576 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 ),
@@ -588,8 +588,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
588588 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
589589 suite .Require ().True (ok )
590590
591- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
592- suite .Require ().NoError ( err )
591+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
592+ suite .Require ().True ( ok )
593593
594594 err = path .EndpointA .UpdateClient ()
595595 suite .Require ().NoError (err )
@@ -610,8 +610,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
610610 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
611611 suite .Require ().True (ok )
612612
613- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
614- suite .Require ().NoError ( err )
613+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
614+ suite .Require ().True ( ok )
615615
616616 err = path .EndpointA .UpdateClient ()
617617 suite .Require ().NoError (err )
@@ -630,8 +630,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
630630 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
631631 suite .Require ().True (ok )
632632
633- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
634- suite .Require ().NoError ( err )
633+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
634+ suite .Require ().True ( ok )
635635
636636 err = path .EndpointA .UpdateClient ()
637637 suite .Require ().NoError (err )
@@ -650,8 +650,8 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() {
650650 trustedHeight , ok := path .EndpointA .GetClientLatestHeight ().(clienttypes.Height )
651651 suite .Require ().True (ok )
652652
653- trustedVals , err := suite .chainB .GetTrustedValidators ( int64 ( trustedHeight .RevisionHeight ))
654- suite .Require ().NoError ( err )
653+ trustedVals , ok := suite .chainB .TrustedValidators [ trustedHeight .RevisionHeight ]
654+ suite .Require ().True ( ok )
655655
656656 err = path .EndpointA .UpdateClient ()
657657 suite .Require ().NoError (err )
0 commit comments