Fixed body downloader bug in Ethereum PoS of downloading blocks ahead of time (#8405)

This commit is contained in:
Giulio rebuffo 2023-10-08 23:23:21 +02:00 committed by GitHub
parent 73e2bad897
commit afd88edea8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,8 +177,10 @@ func (e *EthereumExecutionModule) ValidateChain(ctx context.Context, req *execut
}, tx.Commit()
}
currentHeadHash := rawdb.ReadHeadHeaderHash(tx)
extendingHash := e.forkValidator.ExtendingForkHeadHash()
extendCanonical := extendingHash == libcommon.Hash{}
extendCanonical := extendingHash == libcommon.Hash{} && header.ParentHash == currentHeadHash
status, lvh, validationError, criticalError := e.forkValidator.ValidatePayload(tx, header, body.RawBody(), extendCanonical)
if criticalError != nil {