Browse Source

Remove -blockminsize option

0.13
Suhas Daftuar 8 years ago
parent
commit
27362dda4d
  1. 1
      src/init.cpp
  2. 7
      src/miner.cpp
  3. 2
      src/miner.h
  4. 3
      src/policy/policy.h

1
src/init.cpp

@ -453,7 +453,6 @@ std::string HelpMessage(HelpMessageMode mode) @@ -453,7 +453,6 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageGroup(_("Block creation options:"));
strUsage += HelpMessageOpt("-blockmaxcost=<n>", strprintf(_("Set maximum block cost (default: %d)"), DEFAULT_BLOCK_MAX_COST));
strUsage += HelpMessageOpt("-blockminsize=<n>", strprintf(_("Set minimum block size in bytes (default: %u)"), DEFAULT_BLOCK_MIN_SIZE));
strUsage += HelpMessageOpt("-blockmaxsize=<n>", strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE));
strUsage += HelpMessageOpt("-blockprioritysize=<n>", strprintf(_("Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"), DEFAULT_BLOCK_PRIORITY_SIZE));
if (showDebug)

7
src/miner.cpp

@ -100,13 +100,8 @@ BlockAssembler::BlockAssembler(const CChainParams& _chainparams) @@ -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()

2
src/miner.h

@ -141,7 +141,7 @@ private: @@ -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

3
src/policy/policy.h

@ -14,9 +14,8 @@ @@ -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 **/

Loading…
Cancel
Save