Commit abcb3903 authored by Tom Bradshaw's avatar Tom Bradshaw

Don't try to stake too recent of stake pointers.

parent a30bfb57
......@@ -1984,10 +1984,15 @@ bool GetPointers(stakingnode* pstaker, std::vector<StakePointer>& vStakePointers
return false;
int nBestHeight = chainActive.Height();
for (auto pindex : vBlocksLastPaid) {
if (budget.IsBudgetPaymentBlock(pindex->nHeight))
// Pointer has to be at least deeper than the max reorg depth
if (nBestHeight - pindex->nHeight < Params().MaxReorganizationDepth())
CBlock blockLastPaid;
if (!ReadBlockFromDisk(blockLastPaid, pindex)) {
LogPrintf("GetRecentStakePointer -- Failed reading block from disk\n");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment