Skip to content

Commit

Permalink
Cleanup Fees and Logs in ConnectBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbrod committed Aug 30, 2018
1 parent 61cf036 commit c6e3a52
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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()));

}

Expand Down

0 comments on commit c6e3a52

Please sign in to comment.