diff --git a/src/main.cpp b/src/main.cpp index 2855af5685..71ae82027d 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -3221,8 +3221,8 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck, boo MiningCPID bb = DeserializeBoincBlock(vtx[0].hashBoinc,nVersion); uint64_t nCoinAge = 0; - double dStakeReward = CoinToDouble(nStakeReward+nFees); - double dStakeRewardWithoutFees = CoinToDouble(nStakeReward); + double dStakeReward = CoinToDouble(nStakeReward); + double dStakeRewardWithoutFees = CoinToDouble(nStakeReward - nFees); if (fDebug) LogPrintf("Stake Reward of %f B %f I %f F %.f %s %s ", dStakeReward,bb.ResearchSubsidy,bb.InterestSubsidy,(double)nFees,bb.cpid, bb.Organization); @@ -3330,9 +3330,9 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck, boo if ((bb.ResearchSubsidy + bb.InterestSubsidy + dDrift) < dStakeRewardWithoutFees) { - return DoS(20, error("ConnectBlock[] : Researchers Interest %f + Research %f + TimeDrift %f and total Mint %f, [StakeReward] <> %f, with Out_Interest %f, OUT_POR %f, Fees %f, for CPID %s does not match calculated research subsidy", - bb.InterestSubsidy,bb.ResearchSubsidy,dDrift,CoinToDouble(mint),dStakeRewardWithoutFees, - OUT_INTEREST,OUT_POR,CoinToDouble(nFees),bb.cpid.c_str())); + return DoS(20, error("ConnectBlock[] : Researchers Interest %f + Research %f + TimeDrift %f = %f exceeded by StakeRewardWithoutFees %f, with mint %f, Out_Interest %f, OUT_POR %f, Fees %f, for CPID %s", + bb.InterestSubsidy, bb.ResearchSubsidy, dDrift, bb.ResearchSubsidy + bb.InterestSubsidy + dDrift, + dStakeRewardWithoutFees, mint, OUT_INTEREST, OUT_POR, CoinToDouble(nFees), bb.cpid.c_str())); }