Запрещает кошельку создавать PoS блоки с отрицательной или нулевой наградой.
Аналогично https://github.com/ppcoin/ppcoin/pull/66/
CTxDB txdb("r");
if (!txNew.GetCoinAge(txdb, nCoinAge))
return error("CreateCoinStake : failed to calculate coin age");
- nCredit += GetProofOfStakeReward(nCoinAge, nBits, txNew.nTime);
+
+ int64 nReward = GetProofOfStakeReward(nCoinAge, nBits, txNew.nTime);
+ // Refuse to create mint that has zero or negative reward
+ if(nReward <= 0)
+ return false;
+
+ nCredit += nReward;
}
int64 nMinFee = 0;
for(list<uint256>::const_iterator it = orphans.begin(); it != orphans.end(); ++it)
EraseFromWallet(*it);
-}
\ No newline at end of file
+}