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

Method IsActive

src/stake.cpp:972–986  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

970}
971
972bool Stake::IsActive() const {
973 if (!GetBoolArg("-staking", DEFAULT_STAKE) )
974 return false;
975
976 auto const nHeight = chainActive.Tip()->nHeight;
977 bool nStaking = false;
978
979 if (mapHashedBlocks.count(nHeight))
980 nStaking = true;
981 else if (mapHashedBlocks.count(nHeight - 1) &&
982 HasStaked())
983 nStaking = true;
984
985 return nStaking;
986}
987
988bool Stake::SelectStakeCoins(CWallet* wallet, std::set <std::pair<const CWalletTx*, unsigned int>>& stakecoins, const int64_t targetAmount) {
989 auto const nTime = GetTime();

Callers 2

getinfoFunction · 0.80
getstakingstatusFunction · 0.80

Calls 3

GetBoolArgFunction · 0.85
TipMethod · 0.80
countMethod · 0.45

Tested by

no test coverage detected