diff options
author | Anthony Towns <aj@erisian.com.au> | 2021-04-16 18:34:34 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2021-06-30 08:19:12 +1000 |
commit | c5f36725e877d8eb492383844f8ef7535466b366 (patch) | |
tree | ce68ede5ada96fed4a558a1f88e7354e4a1ac3b7 /src/versionbits.h | |
parent | 4a69b4dbe0d7f504811b67c399da7e6d11e4f805 (diff) |
[refactor] Move ComputeBlockVersion into VersionBitsCache
This also changes ComputeBlockVersion to take the versionbits cache
mutex once, rather than once for each versionbits deployment.
Diffstat (limited to 'src/versionbits.h')
-rw-r--r-- | src/versionbits.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/versionbits.h b/src/versionbits.h index c18a8d1176..0b2f4a0258 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -93,12 +93,11 @@ public: /** Get the block height at which the BIP9 deployment switched into the state for the block after pindexPrev. */ int StateSinceHeight(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos); + /** Determine what nVersion a new block should use + */ + int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Params& params); + void Clear(); }; -/** - * Determine what nVersion a new block should use. - */ -int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Params& params); - #endif // BITCOIN_VERSIONBITS_H |