From 44775d8b494b88b9ac2f75e6f054c649b3d1a413 Mon Sep 17 00:00:00 2001 From: Manav Darji Date: Fri, 7 Feb 2025 18:53:48 +0530 Subject: [PATCH] Revert "consensus/bor: fetch validator set using parent hash" (#1440) --- consensus/bor/bor.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/consensus/bor/bor.go b/consensus/bor/bor.go index 91ad193b81..a49e8c5a45 100644 --- a/consensus/bor/bor.go +++ b/consensus/bor/bor.go @@ -465,9 +465,8 @@ func (c *Bor) verifyCascadingFields(chain consensus.ChainHeaderReader, header *t // Verify the validator list match the local contract if IsSprintStart(number+1, c.config.CalculateSprint(number)) { - // Use parent block's hash to make the eth_call to fetch validators so that the state being - // used to make the call is of the same fork. - newValidators, err := c.spanner.GetCurrentValidatorsByBlockNrOrHash(context.Background(), rpc.BlockNumberOrHashWithHash(header.ParentHash, false), number+1) + newValidators, err := c.spanner.GetCurrentValidatorsByBlockNrOrHash(context.Background(), rpc.BlockNumberOrHashWithNumber(rpc.LatestBlockNumber), number+1) + if err != nil { return err }