MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetBIP9Time

Function GetBIP9Time

src/versionbits.cpp:10–16  ·  view source on GitHub ↗

Elements: We use height, not time!

Source from the content-addressed store, hash-verified

8
9// Elements: We use height, not time!
10int64_t GetBIP9Time(const CBlockIndex* pindexPrev, const Consensus::Params& params) {
11 if (params.elements_mode) {
12 return pindexPrev->nHeight;
13 } else {
14 return pindexPrev->GetMedianTimePast();
15 }
16}
17
18ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const
19{

Callers 1

GetStateForMethod · 0.85

Calls 1

GetMedianTimePastMethod · 0.80

Tested by

no test coverage detected