Changeset View
Changeset View
Standalone View
Standalone View
src/versionbits.cpp
Show First 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | protected: | ||||
} | } | ||||
public: | public: | ||||
VersionBitsConditionChecker(Consensus::DeploymentPos id_) : id(id_) {} | VersionBitsConditionChecker(Consensus::DeploymentPos id_) : id(id_) {} | ||||
uint32_t Mask(const Consensus::Params ¶ms) const { | uint32_t Mask(const Consensus::Params ¶ms) const { | ||||
return ((uint32_t)1) << params.vDeployments[id].bit; | return ((uint32_t)1) << params.vDeployments[id].bit; | ||||
} | } | ||||
}; | }; | ||||
} | } // namespace | ||||
ThresholdState VersionBitsState(const CBlockIndex *pindexPrev, | ThresholdState VersionBitsState(const CBlockIndex *pindexPrev, | ||||
const Consensus::Params ¶ms, | const Consensus::Params ¶ms, | ||||
Consensus::DeploymentPos pos, | Consensus::DeploymentPos pos, | ||||
VersionBitsCache &cache) { | VersionBitsCache &cache) { | ||||
return VersionBitsConditionChecker(pos).GetStateFor(pindexPrev, params, | return VersionBitsConditionChecker(pos).GetStateFor(pindexPrev, params, | ||||
cache.caches[pos]); | cache.caches[pos]); | ||||
} | } | ||||
Show All 19 Lines |