From fd2886b9271c620418f0102052061df601161a70 Mon Sep 17 00:00:00 2001 From: Giulio rebuffo Date: Sun, 3 Jul 2022 12:54:27 +0200 Subject: [PATCH] Revert "fixed compilation (#4614)" (#4615) This reverts commit 1c5ec22d09f39bbca34ddcf6cb20aa5cf737544e. --- eth/stagedsync/stage_headers.go | 2 +- turbo/stages/headerdownload/header_algos.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eth/stagedsync/stage_headers.go b/eth/stagedsync/stage_headers.go index 3492173ed..fe2e3d628 100644 --- a/eth/stagedsync/stage_headers.go +++ b/eth/stagedsync/stage_headers.go @@ -625,7 +625,7 @@ func verifyAndSaveNewPoSHeader( // Side chain or something weird // TODO(yperbasis): considered non-canonical because some missing headers were downloaded but not canonized // Or it's not a problem because forkChoice is updated frequently? - status, latestValidHash, validationError, criticalError := cfg.hd.ValidatePayload(tx, header, body, false, cfg.execPayload) + status, latestValidHash, validationError, criticalError := cfg.hd.ValidatePayload(tx, header, body, cfg.chainConfig.TerminalTotalDifficulty, false, cfg.execPayload) if criticalError != nil { return &privateapi.PayloadStatus{CriticalError: criticalError}, false, criticalError } diff --git a/turbo/stages/headerdownload/header_algos.go b/turbo/stages/headerdownload/header_algos.go index 79944f9b6..9c36365bc 100644 --- a/turbo/stages/headerdownload/header_algos.go +++ b/turbo/stages/headerdownload/header_algos.go @@ -1106,7 +1106,7 @@ func (hd *HeaderDownload) StorePayloadFork(tx kv.RwTx, header *types.Header, bod return nil } -func (hd *HeaderDownload) ValidatePayload(tx kv.RwTx, header *types.Header, body *types.RawBody, store bool, execPayload func(kv.RwTx, *types.Header, *types.RawBody, uint64, []*types.Header, []*types.RawBody) error) (status remote.EngineStatus, latestValidHash common.Hash, validationError error, criticalError error) { +func (hd *HeaderDownload) ValidatePayload(tx kv.RwTx, header *types.Header, body *types.RawBody, terminalTotalDifficulty *big.Int, store bool, execPayload func(kv.RwTx, *types.Header, *types.RawBody, uint64, []*types.Header, []*types.RawBody) error) (status remote.EngineStatus, latestValidHash common.Hash, validationError error, criticalError error) { hd.lock.Lock() defer hd.lock.Unlock() maxDepth := uint64(16)