diff options
| author | Gavin Andresen <[email protected]> | 2012-01-28 10:16:21 -0500 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2012-01-28 10:16:21 -0500 |
| commit | 68649bef9395947f3a71e40daae053ca5c0aabca (patch) | |
| tree | 2322e5a3618906281c9e46bef60324a491bbd4d7 /src/main.cpp | |
| parent | Bitcoin-Qt signmessage GUI (pull request #582) (diff) | |
| download | discoin-68649bef9395947f3a71e40daae053ca5c0aabca.tar.xz discoin-68649bef9395947f3a71e40daae053ca5c0aabca.zip | |
CreateNewBlock was not adding in transaction fees.
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9e13f7a36..5981c675a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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(); |