diff options
| author | Patrick Lodder <[email protected]> | 2021-07-12 01:03:05 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-07-12 01:03:05 +0200 |
| commit | b1a924969057693a55c458ab53894f677abe1823 (patch) | |
| tree | 389dffcde9239314e72c2bd5e05c2b74aec3f2a0 /src/miner.cpp | |
| parent | Merge pull request #2288 from fdoving/fdov-depends-libevent (diff) | |
| parent | Add warning log message if overriding -blockmintxfee (diff) | |
| download | discoin-1.21-dev.tar.xz discoin-1.21-dev.zip | |
Merge pull request #2311 from rnicoll/1.21-subsidy-tests1.21-dev
Rewrite subsidy limit tests (1.21)
Diffstat (limited to 'src/miner.cpp')
| -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 b44cb947d..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)) { - 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); } |