aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
diff options
context:
space:
mode:
authorMike Hearn <mike@plan99.net>2014-03-10 18:59:12 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-03-11 16:45:54 +0100
commit1eedbbb3a6bbb0070cf7f11929ea261a8d6c0b11 (patch)
tree5458261bc87df8a715b8443c9a427c4b6eec49ce /src/miner.cpp
parentff882789af7b24db6095690ae83d0bae38ddb998 (diff)
downloadbitcoin-1eedbbb3a6bbb0070cf7f11929ea261a8d6c0b11.tar.xz
Make mining fee policy match relay fee policy.
This resolves a case in which a mismatch could be used to bloat up the mempool by sending transactions that pay enough fee to relay, but not to be mined, with the default policies. Rebased-From: 037b4f1
Diffstat (limited to 'src/miner.cpp')
-rw-r--r--src/miner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/miner.cpp b/src/miner.cpp
index e52f539085..3351908e65 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -136,7 +136,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
// Minimum block size you want to create; block will be filled with free transactions
// until there are no more or the block reaches this size:
- unsigned int nBlockMinSize = GetArg("-blockminsize", 0);
+ unsigned int nBlockMinSize = GetArg("-blockminsize", DEFAULT_BLOCK_MIN_SIZE);
nBlockMinSize = std::min(nBlockMaxSize, nBlockMinSize);
// Collect memory pool transactions into the block
@@ -254,7 +254,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
continue;
// Skip free transactions if we're past the minimum block size:
- if (fSortedByFee && (dFeePerKb < CTransaction::nMinTxFee) && (nBlockSize + nTxSize >= nBlockMinSize))
+ if (fSortedByFee && (dFeePerKb < CTransaction::nMinRelayTxFee) && (nBlockSize + nTxSize >= nBlockMinSize))
continue;
// Prioritize by fee once past the priority size or we run out of high-priority