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;
5151
5252/* * Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) */
5353int64_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 ) */
5555int64_t CTransaction::nMinRelayTxFee = 1000 ;
5656
5757static 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;
3535
3636/* * The maximum allowed size for a serialized block, in bytes (network rule) */
3737static 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 **/
3939static 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 **/
4142static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 50000 ;
4243/* * 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)
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
You can’t perform that action at this time.
0 commit comments