Skip to content

Commit 669264c

Browse files
committed
Merge branch 'match_relay_fee' of git://github.com/mikehearn/bitcoin
2 parents 1264b36 + 037b4f1 commit 669264c

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ unsigned int nCoinCacheSize = 5000;
5151

5252
/** Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) */
5353
int64_t CTransaction::nMinTxFee = 10000; // Override with -mintxfee
54-
/** Fees smaller than this (in satoshi) are considered zero fee (for relaying) */
54+
/** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */
5555
int64_t CTransaction::nMinRelayTxFee = 1000;
5656

5757
static CMedianFilter<int> cPeerBlockCounts(8, 0); // Amount of blocks that other nodes claim to have

src/main.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ class CInv;
3535

3636
/** The maximum allowed size for a serialized block, in bytes (network rule) */
3737
static const unsigned int MAX_BLOCK_SIZE = 1000000;
38-
/** Default for -blockmaxsize, maximum size for mined blocks **/
38+
/** Default for -blockmaxsize and -blockminsize, which control the range of sizes the mining code will create **/
3939
static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 750000;
40+
static const unsigned int DEFAULT_BLOCK_MIN_SIZE = 0;
4041
/** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/
4142
static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 50000;
4243
/** The maximum size for transactions we're willing to relay/mine */

src/miner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
136136

137137
// Minimum block size you want to create; block will be filled with free transactions
138138
// until there are no more or the block reaches this size:
139-
unsigned int nBlockMinSize = GetArg("-blockminsize", 0);
139+
unsigned int nBlockMinSize = GetArg("-blockminsize", DEFAULT_BLOCK_MIN_SIZE);
140140
nBlockMinSize = std::min(nBlockMaxSize, nBlockMinSize);
141141

142142
// Collect memory pool transactions into the block
@@ -254,7 +254,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
254254
continue;
255255

256256
// Skip free transactions if we're past the minimum block size:
257-
if (fSortedByFee && (dFeePerKb < CTransaction::nMinTxFee) && (nBlockSize + nTxSize >= nBlockMinSize))
257+
if (fSortedByFee && (dFeePerKb < CTransaction::nMinRelayTxFee) && (nBlockSize + nTxSize >= nBlockMinSize))
258258
continue;
259259

260260
// Prioritize by fee once past the priority size or we run out of high-priority

0 commit comments

Comments
 (0)