Get staking parameters from chainparams.cpp

nStakeTimestampMask, nStakeMinConfirmations, nStakeMinAge
This commit is contained in:
lateminer
2017-12-04 23:43:49 +03:00
parent 213fa374d1
commit af6e26a288
8 changed files with 14 additions and 16 deletions

View File

@@ -132,7 +132,7 @@ bool CheckProofOfStake(CBlockIndex* pindexPrev, const CTransaction& tx, unsigned
// Min age requirement
int nDepth;
if (IsConfirmedInNPrevBlocks(txindex, pindexPrev, nStakeMinConfirmations - 1, nDepth))
if (IsConfirmedInNPrevBlocks(txindex, pindexPrev, Params().GetConsensus().nStakeMinConfirmations - 1, nDepth))
return state.DoS(100, error("CheckProofOfStake() : tried to stake at depth %d", nDepth + 1));
if (!CheckStakeKernelHash(pindexPrev, nBits, new CCoins(txPrev, pindexPrev->nHeight), txin.prevout, tx.nTime))