diff options
| author | Ross Nicoll <[email protected]> | 2021-07-11 23:09:17 +0100 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2021-07-11 23:09:17 +0100 |
| commit | 37073aeb09f57cc8e23a762cc06e45688ee8d782 (patch) | |
| tree | 389dffcde9239314e72c2bd5e05c2b74aec3f2a0 | |
| parent | Disable warnings on Mac (diff) | |
| download | discoin-37073aeb09f57cc8e23a762cc06e45688ee8d782.tar.xz discoin-37073aeb09f57cc8e23a762cc06e45688ee8d782.zip | |
Add warning log message if overriding -blockmintxfee
| -rw-r--r-- | src/miner.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/miner.cpp b/src/miner.cpp index 013ea4005..52b8bac64 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -72,8 +72,13 @@ static BlockAssembler::Options DefaultOptions() BlockAssembler::Options options; options.nBlockMaxWeight = gArgs.GetArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT); CAmount n = 0; - if (gArgs.IsArgSet("-blockmintxfee") && ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n) && n <= MAX_FEE_RATE) { - options.blockMinFeeRate = CFeeRate(n); + if (gArgs.IsArgSet("-blockmintxfee")) { + if (ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n) && n <= MAX_FEE_RATE) { + options.blockMinFeeRate = CFeeRate(n); + } else { + LogPrintf("DefaultOptions(): Specified -blockmintxfee is either not a valid amount, or is greater than the maximum fee rate %d.\n", MAX_FEE_RATE); + options.blockMinFeeRate = CFeeRate(DEFAULT_BLOCK_MIN_TX_FEE); + } } else { options.blockMinFeeRate = CFeeRate(DEFAULT_BLOCK_MIN_TX_FEE); } |