Log the reason for a block policy violation
Summary:
Introduce BlockPolicyValidationState so we can log reasons behind block policy
violations. This will also allow callers to make decisions based on the result
of the policy check rather than observing the resulting state (ie. block was
parked).
POLICY_VIOLATION is intentionally left vague. It is not clear in what other
ways policies might fail other than a simple rule violation but it is too early
to determine at this stage.
Test Plan:
ninja check check-functional
Reviewers: #bitcoin_abc, PiRK, Fabien
Reviewed By: #bitcoin_abc, PiRK, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D13482