Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
wanwiset25 committed May 6, 2024
1 parent d6d3879 commit f1e7c3e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions consensus/tests/engine_v2_tests/verify_header_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,17 @@ func TestConfigSwitchOnDifferentMasternodeCount(t *testing.T) {

snap, err := x.GetSnapshot(blockchain, currentBlock.Header())
assert.Nil(t, err)
assert.Equal(t, len(snap.NextEpochMasterNodes), 20)
assert.Equal(t, len(snap.NextEpochMasterNodes), 5)
header1800.Validators = []common.Address{}
for i := 0; i < 20; i++ {
for i := 0; i < len(snap.NextEpochMasterNodes); i++ {
header1800.Validators = append(header1800.Validators, []common.Address{snap.NextEpochMasterNodes[i]}...)
}

round, err := x.GetRoundNumber(header1800)
assert.Nil(t, err)
assert.Equal(t, round, types.Round(900))
assert.Equal(t, round, types.Round(1800))

adaptor.EngineV2.SetNewRoundFaker(blockchain, 899, false)
adaptor.EngineV2.SetNewRoundFaker(blockchain, 1799, false)

err = adaptor.VerifyHeader(blockchain, header1800, true)

Expand Down

0 comments on commit f1e7c3e

Please sign in to comment.