Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions eth/handler_bor.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ func (h *ethHandler) handleMilestone(ctx context.Context, eth *Ethereum, milesto

h.downloader.ProcessMilestone(num, hash)

// Publish the milestone block as finalized and safe. Re-resolve via the
// canonical number→hash mapping so a reorg between verification and this
// write can't promote a stale or non-canonical header.
if block := eth.blockchain.GetBlockByNumber(num); block != nil && block.Hash() == hash {
eth.blockchain.SetFinalized(block.Header())
eth.blockchain.SetSafe(block.Header())
Comment thread
kamuikatsurgi marked this conversation as resolved.
Outdated
}

return nil
}

Expand Down