File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ unsigned int nCoinCacheSize = 5000;
51
51
52
52
/* * Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) */
53
53
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 ) */
55
55
int64_t CTransaction::nMinRelayTxFee = 1000 ;
56
56
57
57
static CMedianFilter<int > cPeerBlockCounts (8 , 0 ); // Amount of blocks that other nodes claim to have
Original file line number Diff line number Diff line change @@ -35,8 +35,9 @@ class CInv;
35
35
36
36
/* * The maximum allowed size for a serialized block, in bytes (network rule) */
37
37
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 **/
39
39
static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 750000 ;
40
+ static const unsigned int DEFAULT_BLOCK_MIN_SIZE = 0 ;
40
41
/* * Default for -blockprioritysize, maximum space for zero/low-fee transactions **/
41
42
static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 50000 ;
42
43
/* * The maximum size for transactions we're willing to relay/mine */
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
136
136
137
137
// Minimum block size you want to create; block will be filled with free transactions
138
138
// 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 );
140
140
nBlockMinSize = std::min (nBlockMaxSize, nBlockMinSize);
141
141
142
142
// Collect memory pool transactions into the block
@@ -254,7 +254,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
254
254
continue ;
255
255
256
256
// 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))
258
258
continue ;
259
259
260
260
// Prioritize by fee once past the priority size or we run out of high-priority
You can’t perform that action at this time.
0 commit comments