@ -668,6 +668,7 @@ func TestLargeGenesisValidator(t *testing.T) {
blockID := types . BlockID { block . Hash ( ) , block . MakePartSet ( testPartSize ) . Header ( ) }
updatedState , err := updateState ( oldState , blockID , & block . Header , abciResponses , validatorUpdates )
require . NoError ( t , err )
// no changes in voting power (ProposerPrio += VotingPower == Voting in 1st round; than shiftByAvg == 0,
// than -Total == -Voting)
// -> no change in ProposerPrio (stays zero):
@ -692,6 +693,7 @@ func TestLargeGenesisValidator(t *testing.T) {
block := makeBlock ( oldState , oldState . LastBlockHeight + 1 )
blockID := types . BlockID { block . Hash ( ) , block . MakePartSet ( testPartSize ) . Header ( ) }
updatedState , err := updateState ( oldState , blockID , & block . Header , abciResponses , validatorUpdates )
require . NoError ( t , err )
lastState := updatedState
for i := 0 ; i < 200 ; i ++ {
@ -706,6 +708,7 @@ func TestLargeGenesisValidator(t *testing.T) {
blockID := types . BlockID { block . Hash ( ) , block . MakePartSet ( testPartSize ) . Header ( ) }
updatedStateInner , err := updateState ( lastState , blockID , & block . Header , abciResponses , validatorUpdates )
require . NoError ( t , err )
lastState = updatedStateInner
}
// set state to last state of above iteration
@ -735,6 +738,7 @@ func TestLargeGenesisValidator(t *testing.T) {
block := makeBlock ( oldState , oldState . LastBlockHeight + 1 )
blockID := types . BlockID { block . Hash ( ) , block . MakePartSet ( testPartSize ) . Header ( ) }
state , err = updateState ( state , blockID , & block . Header , abciResponses , validatorUpdates )
require . NoError ( t , err )
}
require . Equal ( t , 10 + 2 , len ( state . NextValidators . Validators ) )
@ -766,6 +770,7 @@ func TestLargeGenesisValidator(t *testing.T) {
block = makeBlock ( curState , curState . LastBlockHeight + 1 )
blockID = types . BlockID { block . Hash ( ) , block . MakePartSet ( testPartSize ) . Header ( ) }
curState , err = updateState ( curState , blockID , & block . Header , abciResponses , validatorUpdates )
require . NoError ( t , err )
if ! bytes . Equal ( curState . Validators . Proposer . Address , curState . NextValidators . Proposer . Address ) {
isProposerUnchanged = false
}
@ -790,6 +795,7 @@ func TestLargeGenesisValidator(t *testing.T) {
blockID := types . BlockID { block . Hash ( ) , block . MakePartSet ( testPartSize ) . Header ( ) }
updatedState , err = updateState ( updatedState , blockID , & block . Header , abciResponses , validatorUpdates )
require . NoError ( t , err )
if i > numVals { // expect proposers to cycle through after the first iteration (of numVals blocks):
if proposers [ i % numVals ] == nil {
proposers [ i % numVals ] = updatedState . NextValidators . Proposer