From 438c3933af4283f5a5af2ac6e38d17fd62d0e41b Mon Sep 17 00:00:00 2001 From: ledgerwatch Date: Sat, 28 May 2022 17:33:27 +0100 Subject: [PATCH] Fix invalidation of anchors (#4292) Co-authored-by: Alexey Sharp --- turbo/stages/headerdownload/header_algos.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/turbo/stages/headerdownload/header_algos.go b/turbo/stages/headerdownload/header_algos.go index 4c357226b..5f0d7fd4b 100644 --- a/turbo/stages/headerdownload/header_algos.go +++ b/turbo/stages/headerdownload/header_algos.go @@ -374,8 +374,8 @@ func (hd *HeaderDownload) invalidateAnchor(anchor *Anchor, reason string) { log.Debug("Invalidating anchor", "height", anchor.blockHeight, "hash", anchor.parentHash, "reason", reason) hd.removeAnchor(anchor) for child := anchor.fLink; child != nil; child, child.next = child.next, nil { + hd.removeUpwards(child) } - hd.removeUpwards(anchor.fLink) } func (hd *HeaderDownload) RequestMoreHeaders(currentTime uint64) (*HeaderRequest, []PenaltyItem) {