VersionBitsCache::ComputeBlockVersion

Determine what nVersion a new block should use

Synopsis

Declared in <versionbits.h>

[[requires_capability(0x7f2e18fdbc38), requires_capability(0x7f2e1a0cd108), requires_capability(0x7f2e24cb6f38), requires_capability(0x7f2e37ab5458), requires_capability(0x7f2e27e04e58), requires_capability(0x7f2e1eea0e08), requires_capability(0x7f2e283fbbc8)]]
int32_t
ComputeBlockVersion(
    CBlockIndex const* pindexPrev,
    Consensus::Params const& params);

Return Value

The version to use for the new block.

Parameters

NameDescription
pindexPrevThe parent block preceding the new block.
paramsThe consensus parameters holding the deployments.