From 37073aeb09f57cc8e23a762cc06e45688ee8d782 Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Sun, 11 Jul 2021 23:09:17 +0100 Subject: [PATCH] Add warning log message if overriding -blockmintxfee --- src/miner.cpp | 9 +++++++-- 1 file 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); }