core: fix bad parent hash when jumping to genesis in setHead (#23162)

revert-23120-drop-eth-65
gary rong 3 years ago committed by GitHub
parent 99169016d2
commit bd566977e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      core/headerchain.go

@ -574,7 +574,7 @@ func (hc *HeaderChain) SetHead(head uint64, updateFn UpdateHeadBlocksCallback, d
if parent == nil {
parent = hc.genesisHeader
}
parentHash = hdr.ParentHash
parentHash = parent.Hash()
// Notably, since geth has the possibility for setting the head to a low
// height which is even lower than ancient head.

Loading…
Cancel
Save