CreateNewBlock was not adding in transaction fees.

This commit is contained in:
Gavin Andresen 2012-01-28 10:16:21 -05:00
parent 2bc4fd609c
commit 68649bef93
1 changed files with 3 additions and 2 deletions

View File

@ -3073,8 +3073,8 @@ CBlock* CreateNewBlock(CReserveKey& reservekey)
if (!tx.FetchInputs(txdb, mapTestPoolTmp, false, true, mapInputs, fInvalid))
continue;
int64 nFees = tx.GetValueIn(mapInputs)-tx.GetValueOut();
if (nFees < nMinFee)
int64 nTxFees = tx.GetValueIn(mapInputs)-tx.GetValueOut();
if (nTxFees < nMinFee)
continue;
nTxSigOps += tx.GetP2SHSigOpCount(mapInputs);
@ -3091,6 +3091,7 @@ CBlock* CreateNewBlock(CReserveKey& reservekey)
nBlockSize += nTxSize;
++nBlockTx;
nBlockSigOps += nTxSigOps;
nFees += nTxFees;
// Add transactions that depend on this one to the priority queue
uint256 hash = tx.GetHash();