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

Function GetLastBlockIndex

src/pow.cpp:18–23  ·  view source on GitHub ↗

Lux modified: find last block index up to pindex

Source from the content-addressed store, hash-verified

16
17// Lux modified: find last block index up to pindex
18const CBlockIndex* GetLastBlockIndex(const CBlockIndex* pindex, bool fProofOfStake)
19{
20 while (pindex && pindex->pprev && (pindex->IsProofOfStake() != fProofOfStake))
21 pindex = pindex->pprev;
22 return pindex;
23}
24
25unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader* pblock, const Consensus::Params& consenusParams, bool fProofOfStake)
26{

Callers 3

getdifficultyFunction · 0.85
GetNextWorkRequiredFunction · 0.85
getstakingstatusFunction · 0.85

Calls 1

IsProofOfStakeMethod · 0.45

Tested by

no test coverage detected