We no longer send BIP 61 REJECT messages, so there’s no need to set a REJECT code in the CValidationState object.
Note that there is a minor bug fix in p2p behaviour here. Because the
call to MaybePunishNode() in PeerLogicValidation::BlockChecked() only
previously happened if the REJECT code was > 0 and < REJECT_INTERNAL,
then there are cases were MaybePunishNode() can get called where it
wasn’t previously:
- when
AcceptBlockHeader()fails withCACHED_INVALID. - when
AcceptBlockHeader()fails withBLOCK_MISSING_PREV.
Note that BlockChecked() cannot fail with an ‘internal’ reject code. The
only internal reject code was REJECT_HIGHFEE, which was only set in
ATMP.
This reverts a minor bug introduced in 5d08c9c579ba8cc7b684105c6a08263992b08d52.