MCPcopy Create free account
hub / github.com/LUX-Core/lux / GetSelectionTime

Function GetSelectionTime

src/stake.cpp:157–164  ·  view source on GitHub ↗

Get stake modifier selection time (in seconds)

Source from the content-addressed store, hash-verified

155
156// Get stake modifier selection time (in seconds)
157static int64_t GetSelectionTime() {
158 int64_t nSelectionTime = 0;
159 auto const numerator=GetInterval() * 63;
160 for (int nSection = 0; nSection < 64; nSection++) {
161 nSelectionTime += numerator / (nSection + (63 - nSection) * MODIFIER_INTERVAL_RATIO);
162 }
163 return nSelectionTime;
164}
165
166// Finds a block from the candidate blocks in vSortedCandidates, excluding
167// already selected blocks in vSelectedBlocks, and with timestamp up to

Callers 3

ComputeNextModifierMethod · 0.85
GetKernelStakeModifierFunction · 0.85
GetLuxStakeKernelFunction · 0.85

Calls 1

GetIntervalFunction · 0.85

Tested by

no test coverage detected