Skip to content

Commit 150771c

Browse files
committed
Merge pull request #3326
ad898b4 Increase default -blockmaxsize/prioritysize to 750K/50K (Gavin Andresen)
2 parents d670cdd + ad898b4 commit 150771c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ 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-
/** The maximum size for mined blocks */
39-
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
38+
/** Default for -blockmaxsize, maximum size for mined blocks **/
39+
static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 750000;
40+
/** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/
41+
static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 50000;
4042
/** The maximum size for transactions we're willing to relay/mine */
41-
static const unsigned int MAX_STANDARD_TX_SIZE = MAX_BLOCK_SIZE_GEN/5;
43+
static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
4244
/** The maximum allowed number of signature check operations in a block (network rule) */
4345
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
4446
/** The maximum number of orphan transactions kept in memory */
@@ -55,8 +57,6 @@ static const int COINBASE_MATURITY = 100;
5557
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC
5658
/** Maximum number of script-checking threads allowed */
5759
static const int MAX_SCRIPTCHECK_THREADS = 16;
58-
/** Default amount of block size reserved for high-priority transactions (in bytes) */
59-
static const int DEFAULT_BLOCK_PRIORITY_SIZE = 27000;
6060
#ifdef USE_UPNP
6161
static const int fHaveUPnP = true;
6262
#else

src/miner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
124124
pblocktemplate->vTxSigOps.push_back(-1); // updated at end
125125

126126
// Largest block you're willing to create:
127-
unsigned int nBlockMaxSize = GetArg("-blockmaxsize", MAX_BLOCK_SIZE_GEN/2);
127+
unsigned int nBlockMaxSize = GetArg("-blockmaxsize", DEFAULT_BLOCK_MAX_SIZE);
128128
// Limit to betweeen 1K and MAX_BLOCK_SIZE-1K for sanity:
129129
nBlockMaxSize = std::max((unsigned int)1000, std::min((unsigned int)(MAX_BLOCK_SIZE-1000), nBlockMaxSize));
130130

0 commit comments

Comments
 (0)