When logging failures of CheckBlockHeader (high-hash), they are always logged as system error. This is problematic for several reasons:
Submitting a blockheader that fails
CheckBlockHeaderover RPC will result in a debug log line that starts withERROR. Proper behaviour should be to log not anything and instead only return the failure reason to the RPC user. This pull does not fix this issue entirely, but is a good first step in the right direction.A misbehaving peer that sends us an invalid block header that fails
CheckBlockHeaderwill result in a debug log line that starts withERROR. Proper behavior should be to log the remote peer misbehavior if logging for that category was enabled. This pull fixes this issue forCheckBlockHeaderand other functions can be adjusted as well if needed in follow-ups. This should be a good first step in the right direction.