X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fminer.cpp;fp=src%2Fminer.cpp;h=f12376a409623d0b0bb4bcfeda17dfc6b7c649c2;hp=0d63e3c89b4570137d2eaca4647f7d12c633c03e;hb=ea44503ffc26beba484cd5887c4c38f7ca247260;hpb=ea46cd0a8d011c48371e9720e247dd3a2bbdc947 diff --git a/src/miner.cpp b/src/miner.cpp index 0d63e3c..f12376a 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -289,9 +289,6 @@ CBlock* CreateNewBlock(CWallet* pwallet, CTransaction *txCoinStake) if (tx.nTime > GetAdjustedTime() || (fProofOfStake && tx.nTime > txCoinStake->nTime)) continue; - // Simplify transaction fee - allow free = false - int64_t 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)) continue; @@ -314,10 +311,13 @@ CBlock* CreateNewBlock(CWallet* pwallet, CTransaction *txCoinStake) if (!tx.FetchInputs(txdb, mapTestPoolTmp, false, true, mapInputs, fInvalid)) continue; + // Transaction fee int64_t nTxFees = tx.GetValueIn(mapInputs)-tx.GetValueOut(); + int64_t nMinFee = tx.GetMinFee(nBlockSize, true, GMF_BLOCK, nTxSize); if (nTxFees < nMinFee) continue; + // Sigops accumulation nTxSigOps += tx.GetP2SHSigOpCount(mapInputs); if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS) continue;