fix nRewardCoinYear
authorfsb4000 <fsb4000@yandex.ru>
Thu, 20 Nov 2014 01:06:28 +0000 (07:06 +0600)
committerfsb4000 <fsb4000@yandex.ru>
Thu, 20 Nov 2014 01:06:28 +0000 (07:06 +0600)
Максимальный процент годовых за PoS-майнинг = 100%

src/kernelrecord.cpp

index 2c6f2d9..1f857c1 100644 (file)
@@ -85,6 +85,7 @@ double KernelRecord::getPoSReward(double difficulty, int minutes)
         return 0;
     uint64 coinAge = (nValue * nWeight ) / (COIN * 86400);
     double nRewardCoinYear = floor(pow((0.03125 / difficulty), 1.0/3) *100)/100;
+    nRewardCoinYear = min(nRewardCoinYear,1.0);
     PoSReward = (coinAge * nRewardCoinYear )/365;
     PoSReward = min(PoSReward,10.0);
     return PoSReward;