From cb94db119f4643f49da63520d64efc99fb0c0795 Mon Sep 17 00:00:00 2001 From: Fabian Jahr Date: Thu, 24 Dec 2020 00:11:40 +0100 Subject: validation, index: Add unspendable coinbase helper functions Making the checks to identify BIP30 available outside of validation.cpp is needed for reporting and tracking statistics on specific blocks and the UTXO set correctly. --- src/validation.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/validation.h') diff --git a/src/validation.h b/src/validation.h index fb6d59f92e..a8ef7a8b3a 100644 --- a/src/validation.h +++ b/src/validation.h @@ -1082,4 +1082,10 @@ bool DeploymentEnabled(const ChainstateManager& chainman, DEP dep) */ const AssumeutxoData* ExpectedAssumeutxo(const int height, const CChainParams& params); +/** Identifies blocks that overwrote an existing coinbase output in the UTXO set (see BIP30) */ +bool IsBIP30Repeat(const CBlockIndex& block_index); + +/** Identifies blocks which coinbase output was subsequently overwritten in the UTXO set (see BIP30) */ +bool IsBIP30Unspendable(const CBlockIndex& block_index); + #endif // BITCOIN_VALIDATION_H -- cgit v1.2.3