mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Introduce (and use) an IsArgSet accessor method
This commit is contained in:
@@ -84,12 +84,12 @@ BlockAssembler::BlockAssembler(const CChainParams& _chainparams)
|
||||
nBlockMaxWeight = DEFAULT_BLOCK_MAX_WEIGHT;
|
||||
nBlockMaxSize = DEFAULT_BLOCK_MAX_SIZE;
|
||||
bool fWeightSet = false;
|
||||
if (mapArgs.count("-blockmaxweight")) {
|
||||
if (IsArgSet("-blockmaxweight")) {
|
||||
nBlockMaxWeight = GetArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT);
|
||||
nBlockMaxSize = MAX_BLOCK_SERIALIZED_SIZE;
|
||||
fWeightSet = true;
|
||||
}
|
||||
if (mapArgs.count("-blockmaxsize")) {
|
||||
if (IsArgSet("-blockmaxsize")) {
|
||||
nBlockMaxSize = GetArg("-blockmaxsize", DEFAULT_BLOCK_MAX_SIZE);
|
||||
if (!fWeightSet) {
|
||||
nBlockMaxWeight = nBlockMaxSize * WITNESS_SCALE_FACTOR;
|
||||
|
||||
Reference in New Issue
Block a user