HomePhabricator

Log the reason for a block policy violation

Description

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

Details

Provenance
sdulfariAuthored on Mar 27 2023, 18:59
sdulfariPushed on Apr 3 2023, 17:26
Reviewer
Restricted Project
Differential Revision
D13482: Log the reason for a block policy violation
Parents
rABC201a7ecbbbe2: [Chronik] Add `Group::ser_member`, remove `Into<Vec<u8>>` bound on `Group…
Branches
Unknown
Tags
Unknown