Skip to content

Commit

Permalink
fix: fix bad block hash because of chain reorg (#152)
Browse files Browse the repository at this point in the history
* fix bad block hash because of chain reorg

* update
  • Loading branch information
calmbeing committed Jun 29, 2023
1 parent 0d45536 commit e4f2745
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions turbo/stages/headerdownload/header_algos.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,6 @@ func (hd *HeaderDownload) InsertHeader(hf FeedHeaderFunc, terminalTotalDifficult
if !link.verified {
if err := hd.VerifyHeader(link.header); err != nil {
hd.badPoSHeaders[link.hash] = link.header.ParentHash
// record the bad link
hd.badHeaders[link.hash] = struct{}{}
if errors.Is(err, consensus.ErrFutureBlock) {
// This may become valid later
log.Warn("[downloader] Added future link", "hash", link.hash, "height", link.blockHeight, "timestamp", link.header.Time)
Expand Down

0 comments on commit e4f2745

Please sign in to comment.