Page MenuHomePhabricator

validation: don't try to invalidate genesis block
ClosedPublic

Authored by PiRK on Oct 17 2022, 07:25.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCdc107a2d3892: validation: don't try to invalidate genesis block
Summary

The code for creating the candidate block map assumes that the passed block's previous block (pindex->pprev) is available and otherwise segfaults due to null-pointer deference in CBlockIndexWorkComparator(). Rather than analyzing all possible code paths and implications for this corner case, simply fail early if the genesis block is passed.

This is a backport of core#20921

Test Plan

ninja all check-all