X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fminer.cpp;h=99267651c50f4535fa6ba6f36278f4c7529db1c3;hb=8d43f1482a14263a76c039c227c4383580dcc1db;hp=d478f7106a2c1560bd6b0248dde9ecac24eeec66;hpb=dec9891824ffe6aaeed1f808824f11344310a631;p=novacoin.git diff --git a/src/miner.cpp b/src/miner.cpp index d478f71..9926765 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -279,7 +279,7 @@ CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake) continue; // Simplify transaction fee - allow free = false - int64 nMinFee = tx.GetMinFee(nBlockSize, false, GMF_BLOCK); + int64 nMinFee = tx.GetMinFee(nBlockSize, true, GMF_BLOCK, nTxSize); // Skip free transactions if we're past the minimum block size: if (fSortedByFee && (dFeePerKb < nMinTxFee) && (nBlockSize + nTxSize >= nBlockMinSize)) @@ -355,7 +355,10 @@ CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake) printf("CreateNewBlock(): total size %"PRI64u"\n", nBlockSize); if (!fProofOfStake) - pblock->vtx[0].vout[0].nValue = GetProofOfWorkReward(pblock->nBits); + { + bool fProtocol048 = fTestNet || VALIDATION_SWITCH_TIME < pblock->nTime; + pblock->vtx[0].vout[0].nValue = GetProofOfWorkReward(pblock->nBits, fProtocol048 ? nFees : 0); + } // Fill in header pblock->hashPrevBlock = pindexPrev->GetBlockHash();