Add a check for the PoW’s validity to AcceptBlockHeader
, and disable the check during LoadBlockIndex
. Previously, if a peer sends headers with invalid PoW, they would be accepted to the on-disk block index, but then loading it on the next start would fail.
Not sure if the proposed patch is the perfect solution. Maybe the check in LoadBlockIndex
should stay and just the one in AcceptBlockHeader
be added?