Skip to content

Commit

Permalink
Fixed body downloader bug in Ethereum PoS of downloading blocks ahead…
Browse files Browse the repository at this point in the history
… of time (erigontech#8405)
  • Loading branch information
Giulio2002 authored Oct 8, 2023
1 parent 73e2bad commit afd88ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion turbo/execution/eth1/ethereum_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit afd88ed

Please sign in to comment.