bitcoin/bitcoin — pull request #5269 by domob1812 (2014-11-13 07:35:42+00:00)
Title: Check PoW in AcceptBlockHeader and not LoadBlockIndex.

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?