core: write head hash to db after snap sync is complete (#34912)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run

This commit is contained in:
cui 2026-05-12 10:05:39 +08:00 committed by GitHub
parent c16684c1ee
commit d446676fc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1186,6 +1186,7 @@ func (bc *BlockChain) SnapSyncComplete(hash common.Hash) error {
}
// If all checks out, manually set the head block.
rawdb.WriteHeadBlockHash(bc.db, hash)
bc.currentBlock.Store(block.Header())
headBlockGauge.Update(int64(block.NumberU64()))