From e481bf28bbbae442c20cca2baab7588ce9847653 Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Tue, 12 Oct 2021 19:56:49 +0200 Subject: [PATCH] fix: always check nDustLimit to be >= nHardDustLimit Moves the check for parameter interaction between both dust limits to be done regardless of setting a custom soft dust limit. --- src/init.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index cb59200a8..ebfe30960 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1048,15 +1048,15 @@ bool AppInitParameterInteraction() if (!ParseMoney(GetArg("-dustlimit", ""), n)) return InitError(AmountErrMsg("dustlimit", GetArg("-dustlimit", ""))); - if (n < nHardDustLimit) - { - n = nHardDustLimit; - LogPrintf("Increasing -dustlimit to %s to match -harddustlimit\n", FormatMoney(nHardDustLimit)); - } - nDustLimit = n; } + if (nDustLimit < nHardDustLimit) + { + nDustLimit = nHardDustLimit; + LogPrintf("Increasing -dustlimit to %s to match -harddustlimit\n", FormatMoney(nHardDustLimit)); + } + #ifdef ENABLE_WALLET if (!CWallet::ParameterInteraction()) return false;