Skip to content

Commit 44775d8

Browse files
authored
Revert "consensus/bor: fetch validator set using parent hash" (#1440)
1 parent 51af82c commit 44775d8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

consensus/bor/bor.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,8 @@ func (c *Bor) verifyCascadingFields(chain consensus.ChainHeaderReader, header *t
465465

466466
// Verify the validator list match the local contract
467467
if IsSprintStart(number+1, c.config.CalculateSprint(number)) {
468-
// Use parent block's hash to make the eth_call to fetch validators so that the state being
469-
// used to make the call is of the same fork.
470-
newValidators, err := c.spanner.GetCurrentValidatorsByBlockNrOrHash(context.Background(), rpc.BlockNumberOrHashWithHash(header.ParentHash, false), number+1)
468+
newValidators, err := c.spanner.GetCurrentValidatorsByBlockNrOrHash(context.Background(), rpc.BlockNumberOrHashWithNumber(rpc.LatestBlockNumber), number+1)
469+
471470
if err != nil {
472471
return err
473472
}

0 commit comments

Comments
 (0)