MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / IsUAHFActivatingBlock

Function IsUAHFActivatingBlock

src/utilfork.cpp:10–22  ·  view source on GitHub ↗

Check if this block activates UAHF. The next block is fork block and must be > 1MB.

Source from the content-addressed store, hash-verified

8
9// Check if this block activates UAHF. The next block is fork block and must be > 1MB.
10bool IsUAHFActivatingBlock(int64_t mtpCurrent, CBlockIndex* pindexPrev) {
11 if (!Opt().UAHFTime())
12 return false;
13
14 if (mtpCurrent < Opt().UAHFTime())
15 return false;
16
17 if (pindexPrev == nullptr)
18 // we activated at genesis (happens in regtest)
19 return true;
20
21 return pindexPrev->GetMedianTimePast() < Opt().UAHFTime();
22}

Callers 4

GetNextMaxBlockSizeFunction · 0.85
ConnectTipFunction · 0.85
ContextualCheckBlockFunction · 0.85
isActivatingFunction · 0.85

Calls 3

OptClass · 0.85
UAHFTimeMethod · 0.80
GetMedianTimePastMethod · 0.80

Tested by 1

isActivatingFunction · 0.68