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

This commit is contained in:
gary rong
2021-07-06 10:32:26 +03:00
committed by GitHub
parent 99169016d2
commit bd566977e8
+1 -1
View File
@@ -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.