From 27362dda4d583a43ebf687ae097d2f45ba1c4c32 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Thu, 30 Jun 2016 11:41:13 -0400 Subject: [PATCH] Remove -blockminsize option --- src/init.cpp | 1 - src/miner.cpp | 7 +------ src/miner.h | 2 +- src/policy/policy.h | 3 +-- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 5d29f14eb..fdf6301d2 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -453,7 +453,6 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageGroup(_("Block creation options:")); strUsage += HelpMessageOpt("-blockmaxcost=", strprintf(_("Set maximum block cost (default: %d)"), DEFAULT_BLOCK_MAX_COST)); - strUsage += HelpMessageOpt("-blockminsize=", strprintf(_("Set minimum block size in bytes (default: %u)"), DEFAULT_BLOCK_MIN_SIZE)); strUsage += HelpMessageOpt("-blockmaxsize=", strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE)); strUsage += HelpMessageOpt("-blockprioritysize=", strprintf(_("Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"), DEFAULT_BLOCK_PRIORITY_SIZE)); if (showDebug) diff --git a/src/miner.cpp b/src/miner.cpp index eb71355e7..8153fb9f9 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -100,13 +100,8 @@ BlockAssembler::BlockAssembler(const CChainParams& _chainparams) // Limit size to between 1K and MAX_BLOCK_SERIALIZED_SIZE-1K for sanity: nBlockMaxSize = std::max((unsigned int)1000, std::min((unsigned int)(MAX_BLOCK_SERIALIZED_SIZE-1000), nBlockMaxSize)); - // 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: - nBlockMinSize = GetArg("-blockminsize", DEFAULT_BLOCK_MIN_SIZE); - nBlockMinSize = std::min(nBlockMaxSize, nBlockMinSize); - // Whether we need to account for byte usage (in addition to cost usage) - fNeedSizeAccounting = (nBlockMaxSize < MAX_BLOCK_SERIALIZED_SIZE-1000) || (nBlockMinSize > 0); + fNeedSizeAccounting = (nBlockMaxSize < MAX_BLOCK_SERIALIZED_SIZE-1000); } void BlockAssembler::resetBlock() diff --git a/src/miner.h b/src/miner.h index 037639b2b..d16e37bb5 100644 --- a/src/miner.h +++ b/src/miner.h @@ -141,7 +141,7 @@ private: // Configuration parameters for the block size bool fIncludeWitness; - unsigned int nBlockMaxCost, nBlockMaxSize, nBlockMinSize; + unsigned int nBlockMaxCost, nBlockMaxSize; bool fNeedSizeAccounting; // Information on the current status of the block diff --git a/src/policy/policy.h b/src/policy/policy.h index fefb562ff..29a8cc57c 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -14,9 +14,8 @@ class CCoinsViewCache; -/** Default for -blockmaxsize and -blockminsize, which control the range of sizes the mining code will create **/ +/** Default for -blockmaxsize, which controls the maximum size of block the mining code will create **/ static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 750000; -static const unsigned int DEFAULT_BLOCK_MIN_SIZE = 0; /** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/ static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 0; /** Default for -blockmaxcost, which control the range of block costs the mining code will create **/