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/init.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/init.cpp')
| -rw-r--r-- | src/init.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index 36b82c243..b38f192c1 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1118,6 +1118,8 @@ bool AppInitParameterInteraction(const ArgsManager& args) CAmount n = 0; if (!ParseMoney(args.GetArg("-incrementalrelayfee", ""), n)) return InitError(AmountErrMsg("incrementalrelayfee", args.GetArg("-incrementalrelayfee", ""))); + if (n > MAX_FEE_RATE) + return InitError(strprintf(Untranslated("-incrementalrelayfee is greater than maximum fee rate of %ld."), MAX_FEE_RATE)); incrementalRelayFee = CFeeRate(n); } @@ -1154,6 +1156,8 @@ bool AppInitParameterInteraction(const ArgsManager& args) if (!ParseMoney(args.GetArg("-minrelaytxfee", ""), n)) { return InitError(AmountErrMsg("minrelaytxfee", args.GetArg("-minrelaytxfee", ""))); } + if (n > MAX_FEE_RATE) + return InitError(strprintf(Untranslated("-minrelaytxfee is greater than maximum fee rate of %ld."), MAX_FEE_RATE)); // High fee check is done afterward in CWallet::Create() ::minRelayTxFee = CFeeRate(n); } else if (incrementalRelayFee > ::minRelayTxFee) { @@ -1176,6 +1180,8 @@ bool AppInitParameterInteraction(const ArgsManager& args) CAmount n = 0; if (!ParseMoney(args.GetArg("-dustrelayfee", ""), n)) return InitError(AmountErrMsg("dustrelayfee", args.GetArg("-dustrelayfee", ""))); + if (n > MAX_FEE_RATE) + return InitError(strprintf(Untranslated("-dustrelayfee is greater than maximum fee rate of %ld."), MAX_FEE_RATE)); dustRelayFee = CFeeRate(n); } |