MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / UpdateTime

Function UpdateTime

src/main.cpp:623–625  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

621}
622
623void UpdateTime(CBlockHeader &block, const CBlockIndex *pIndexPrev) {
624 block.SetTime(max(pIndexPrev->GetMedianTimePast() + 1, GetAdjustedTime()));
625}
626
627bool DisconnectBlock(CBlock &block, CCacheWrapper &cw, CBlockIndex *pIndex, CValidationState &state, bool *pfClean) {
628 auto bmTx = MAKE_BENCHMARK("DisconnectBlock");

Callers

nothing calls this directly

Calls 3

GetAdjustedTimeFunction · 0.85
SetTimeMethod · 0.80
GetMedianTimePastMethod · 0.80

Tested by

no test coverage detected