Skip to content

Commit bd56697

Browse files
authored
core: fix bad parent hash when jumping to genesis in setHead (#23162)
1 parent 9916901 commit bd56697

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/headerchain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ func (hc *HeaderChain) SetHead(head uint64, updateFn UpdateHeadBlocksCallback, d
574574
if parent == nil {
575575
parent = hc.genesisHeader
576576
}
577-
parentHash = hdr.ParentHash
577+
parentHash = parent.Hash()
578578

579579
// Notably, since geth has the possibility for setting the head to a low
580580
// height which is even lower than ancient head.

0 commit comments

Comments
 (0)