Skip to content

Commit

Permalink
bugfix: return Genesis hash instead of breaking on nil
Browse files Browse the repository at this point in the history
  • Loading branch information
0xalank committed Apr 11, 2023
1 parent c77936b commit d057829
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions core/headerchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,6 @@ func (hc *HeaderChain) findCommonAncestor(header *types.Header) *types.Header {
return nil
}
canonicalHash := rawdb.ReadCanonicalHash(hc.headerDb, header.NumberU64())
if canonicalHash == hc.config.GenesisHash {
return nil
}
if canonicalHash == header.Hash() {
return hc.GetHeaderByHash(canonicalHash)
}
Expand Down

0 comments on commit d057829

Please sign in to comment.