@@ -91,7 +91,7 @@ func TestBlacklistVerifyProposedBlacklist(t *testing.T) {
9191 },
9292 } {
9393 t .Run (testCase .name , func (t * testing.T ) {
94- err := testCase .blacklist .VerifyProposedBlacklist (testCase .proposedBlacklist , testCase .nodeCount , testCase . round )
94+ err := testCase .blacklist .VerifyProposedBlacklist (testCase .proposedBlacklist , testCase .round )
9595 require .ErrorContains (t , err , testCase .expectedErr .Error ())
9696 })
9797 }
@@ -581,6 +581,10 @@ func TestUpdateBytesEqualsLen(t *testing.T) {
581581}
582582
583583func TestVerifyBlacklistUpdates (t * testing.T ) {
584+ testBlacklist := Blacklist {
585+ NodeCount : 4 ,
586+ }
587+
584588 for _ , testCase := range []struct {
585589 name string
586590 Blacklist Blacklist
@@ -604,13 +608,15 @@ func TestVerifyBlacklistUpdates(t *testing.T) {
604608 {Type : 3 , NodeIndex : 1 },
605609 },
606610 expectedErr : errBlacklistInvalidUpdateType ,
611+ Blacklist : testBlacklist ,
607612 },
608613 {
609614 name : "invalid index" ,
610615 updates : []BlacklistUpdate {
611616 {Type : BlacklistOpType_NodeRedeemed , NodeIndex : 4 },
612617 },
613618 expectedErr : errBlacklistInvalidNodeIndex ,
619+ Blacklist : testBlacklist ,
614620 },
615621 {
616622 name : "double vote" ,
@@ -620,6 +626,7 @@ func TestVerifyBlacklistUpdates(t *testing.T) {
620626 {Type : BlacklistOpType_NodeSuspected , NodeIndex : 3 },
621627 },
622628 expectedErr : errBlacklistNodeIndexAlreadyUpdated ,
629+ Blacklist : testBlacklist ,
623630 },
624631 {
625632 name : "already blacklisted" ,
@@ -646,7 +653,7 @@ func TestVerifyBlacklistUpdates(t *testing.T) {
646653 },
647654 } {
648655 t .Run (testCase .name , func (t * testing.T ) {
649- err := testCase .Blacklist .verifyBlacklistUpdates (testCase .updates , 4 )
656+ err := testCase .Blacklist .verifyBlacklistUpdates (testCase .updates )
650657 require .ErrorContains (t , err , testCase .expectedErr .Error ())
651658 })
652659 }
@@ -797,7 +804,7 @@ func simulateRound(t *testing.T, blrsi blacklistRoundSimulationInput) Blacklist
797804
798805 newBlacklist := prevBlacklist .ApplyUpdates (updates , round )
799806
800- err := prevBlacklist .VerifyProposedBlacklist (newBlacklist , nodeCount , round )
807+ err := prevBlacklist .VerifyProposedBlacklist (newBlacklist , round )
801808 require .NoError (t , err , "round %d" , round )
802809
803810 return newBlacklist
0 commit comments