@@ -89,32 +89,3 @@ func (ts *ValidatorSetTestSuite) TestCheckpoint() {
8989 ts .Equal (int (validator .Checkpoint (3 )), 33 )
9090 ts .Equal (int (validator .Checkpoint (9 )), 99 )
9191}
92-
93- func (ts * ValidatorSetTestSuite ) TestTrustValidator () {
94- trusted := Validators ([][]byte {{1 }, {2 }, {3 }, {4 }, {5 }})
95- ts .True (trusted .Contains ([][]byte {{1 }, {2 }, {3 }, {4 }, {5 }}))
96- ts .True (trusted .Contains ([][]byte {{1 }, {2 }, {3 }, {4 }, {5 }, {10 }, {11 }, {12 }, {13 }, {14 }}))
97- ts .True (trusted .Contains ([][]byte {{1 }, {2 }, {3 }, {4 }}))
98- ts .True (trusted .Contains ([][]byte {{1 }, {2 }, {3 }, {4 }, {10 }, {11 }, {12 }, {13 }, {14 }}))
99- ts .True (trusted .Contains ([][]byte {{1 }, {2 }, {3 }}))
100- ts .True (trusted .Contains ([][]byte {{1 }, {2 }, {3 }, {10 }, {11 }, {12 }, {13 }, {14 }}))
101- ts .True (trusted .Contains ([][]byte {{1 }, {2 }}))
102- ts .True (trusted .Contains ([][]byte {{1 }, {2 }, {10 }, {11 }, {12 }, {13 }, {14 }}))
103- ts .False (trusted .Contains ([][]byte {{1 }}))
104- ts .False (trusted .Contains ([][]byte {{1 }, {10 }, {11 }, {12 }, {13 }, {14 }}))
105- ts .False (trusted .Contains ([][]byte {}))
106- ts .False (trusted .Contains ([][]byte {{10 }, {11 }, {12 }, {13 }, {14 }}))
107- }
108-
109- func (ts * ValidatorSetTestSuite ) TestThreshold () {
110- ts .Equal (1 , Validators (make ([][]byte , 1 )).threshold ())
111- ts .Equal (1 , Validators (make ([][]byte , 2 )).threshold ())
112- ts .Equal (2 , Validators (make ([][]byte , 3 )).threshold ())
113- ts .Equal (2 , Validators (make ([][]byte , 4 )).threshold ())
114- ts .Equal (2 , Validators (make ([][]byte , 5 )).threshold ())
115- ts .Equal (3 , Validators (make ([][]byte , 6 )).threshold ())
116- ts .Equal (3 , Validators (make ([][]byte , 7 )).threshold ())
117- ts .Equal (3 , Validators (make ([][]byte , 8 )).threshold ())
118- ts .Equal (4 , Validators (make ([][]byte , 9 )).threshold ())
119- ts .Equal (8 , Validators (make ([][]byte , 21 )).threshold ())
120- }
0 commit comments