aboutsummaryrefslogtreecommitdiff
path: root/src/versionbits.h
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-09-15 16:16:56 -0400
committerCarl Dong <contact@carldong.me>2021-03-01 17:56:07 -0500
commit31eac50c721dd3b0bd2347e76196bf16913e9be9 (patch)
treed9712e82d978f0bfc840c5a837a1d758f3288e66 /src/versionbits.h
parent63e4c7316a537900f525e221d8042587b443cc3d (diff)
validation: Remove global ::VersionBitsTip{State,SinceHeight,Statistics}
Tip: versionbitscache is currently a global so we didn't need to pass it in to any of ::VersionBitsTip*'s callers
Diffstat (limited to 'src/versionbits.h')
-rw-r--r--src/versionbits.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/versionbits.h b/src/versionbits.h
index b02f848b67..6df1db8814 100644
--- a/src/versionbits.h
+++ b/src/versionbits.h
@@ -79,8 +79,11 @@ struct VersionBitsCache
void Clear();
};
+/** Get the BIP9 state for a given deployment at the current tip. */
ThresholdState VersionBitsState(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache);
+/** Get the numerical statistics for the BIP9 state for a given deployment at the current tip. */
BIP9Stats VersionBitsStatistics(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos);
+/** Get the block height at which the BIP9 deployment switched into the state for the block building on the current tip. */
int VersionBitsStateSinceHeight(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache);
uint32_t VersionBitsMask(const Consensus::Params& params, Consensus::DeploymentPos pos);