diff --git a/eth/stagedsync/stage_headers.go b/eth/stagedsync/stage_headers.go index 6778eb848..9c5c600c5 100644 --- a/eth/stagedsync/stage_headers.go +++ b/eth/stagedsync/stage_headers.go @@ -352,7 +352,6 @@ func startHandlingForkChoice( } } - cfg.hd.UpdateTopSeenHeightPoS(headerNumber) forkingPoint, err := forkingPoint(ctx, tx, headerInserter, cfg.blockReader, header) if err != nil { return nil, err @@ -476,7 +475,6 @@ func handleNewPayload( headerHash := block.Hash() log.Info(fmt.Sprintf("[%s] Handling new payload", s.LogPrefix()), "height", headerNumber, "hash", headerHash) - cfg.hd.UpdateTopSeenHeightPoS(headerNumber) parent, err := cfg.blockReader.HeaderByHash(ctx, tx, header.ParentHash) if err != nil { diff --git a/turbo/stages/headerdownload/header_algos.go b/turbo/stages/headerdownload/header_algos.go index e0bd04e38..bc5bf05ad 100644 --- a/turbo/stages/headerdownload/header_algos.go +++ b/turbo/stages/headerdownload/header_algos.go @@ -1063,24 +1063,6 @@ func (hd *HeaderDownload) SetFirstPoSHeight(blockHeight uint64) { } } -func (hd *HeaderDownload) TopSeenHeight() uint64 { - hd.lock.RLock() - defer hd.lock.RUnlock() - if hd.topSeenHeightPoW > hd.topSeenHeightPoS { - return hd.topSeenHeightPoW - } else { - return hd.topSeenHeightPoS - } -} - -func (hd *HeaderDownload) UpdateTopSeenHeightPoS(blockHeight uint64) { - hd.lock.Lock() - defer hd.lock.Unlock() - if blockHeight > hd.topSeenHeightPoS { - hd.topSeenHeightPoS = blockHeight - } -} - func (hd *HeaderDownload) SetHeaderReader(headerReader consensus.ChainHeaderReader) { hd.lock.Lock() defer hd.lock.Unlock() diff --git a/turbo/stages/headerdownload/header_data_struct.go b/turbo/stages/headerdownload/header_data_struct.go index 589c4beda..2bc7c850f 100644 --- a/turbo/stages/headerdownload/header_data_struct.go +++ b/turbo/stages/headerdownload/header_data_struct.go @@ -303,7 +303,6 @@ type HeaderDownload struct { headerReader services.HeaderReader // Proof of Stake (PoS) - topSeenHeightPoS uint64 firstSeenHeightPoS *uint64 requestId int posAnchor *Anchor