From a3986935f073be799a35dfa92ab5004e12b35467 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 15 Sep 2022 15:32:15 +1000 Subject: [PATCH] validation: export GetBlockScriptFlags() --- src/validation.cpp | 5 +---- src/validation.h | 3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 7b7c8b2d5bd..ae8e80aa6ab 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -262,9 +262,6 @@ bool CheckSequenceLocksAtTip(CBlockIndex* tip, return EvaluateSequenceLocks(index, {lock_points.height, lock_points.time}); } -// Returns the script flags which should be checked for a given block -static unsigned int GetBlockScriptFlags(const CBlockIndex& block_index, const ChainstateManager& chainman); - static void LimitMempoolSize(CTxMemPool& pool, CCoinsViewCache& coins_cache) EXCLUSIVE_LOCKS_REQUIRED(::cs_main, pool.cs) { @@ -2328,7 +2325,7 @@ DisconnectResult Chainstate::DisconnectBlock(const CBlock& block, const CBlockIn return fClean ? DISCONNECT_OK : DISCONNECT_UNCLEAN; } -static unsigned int GetBlockScriptFlags(const CBlockIndex& block_index, const ChainstateManager& chainman) +unsigned int GetBlockScriptFlags(const CBlockIndex& block_index, const ChainstateManager& chainman) { const Consensus::Params& consensusparams = chainman.GetConsensus(); diff --git a/src/validation.h b/src/validation.h index 6be6ae287fc..86329e959cc 100644 --- a/src/validation.h +++ b/src/validation.h @@ -1358,4 +1358,7 @@ bool IsBIP30Repeat(const CBlockIndex& block_index); /** Identifies blocks which coinbase output was subsequently overwritten in the UTXO set (see BIP30) */ bool IsBIP30Unspendable(const uint256& block_hash, int block_height); +// Returns the script flags which should be checked for a given block +unsigned int GetBlockScriptFlags(const CBlockIndex& block_index, const ChainstateManager& chainman); + #endif // BITCOIN_VALIDATION_H