Bitcoin ABC 0.30.7
P2P Digital Currency
parkingpolicy.h
Go to the documentation of this file.
1// Copyright (c) 2023 The Bitcoin developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_POLICY_BLOCK_PARKINGPOLICY_H
6#define BITCOIN_POLICY_BLOCK_PARKINGPOLICY_H
7
9
18};
19
21 : public ValidationState<BlockPolicyValidationResult> {};
22
24 virtual ~ParkingPolicy() {}
25
26 // Return true if a policy succeeds. False will park the block.
27 virtual bool operator()(BlockPolicyValidationState &state) = 0;
28};
29
30#endif // BITCOIN_POLICY_BLOCK_PARKINGPOLICY_H
Template for capturing information about block/transaction validation.
Definition: validation.h:89
BlockPolicyValidationResult
A "reason" why a block did not pass block policy checks.
Definition: parkingpolicy.h:13
@ POLICY_VIOLATION
A block policy rule was violated. This block should be parked.
@ POLICY_RESULT_UNSET
Initial value. Policy rule has not yet been violated.
virtual bool operator()(BlockPolicyValidationState &state)=0
virtual ~ParkingPolicy()
Definition: parkingpolicy.h:24