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.
This commit is contained in:
Fabian Jahr
2020-12-24 00:11:40 +01:00
parent 6d40484684
commit cb94db119f
3 changed files with 20 additions and 7 deletions

View File

@@ -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