diff options
| author | Samuel Dobson <[email protected]> | 2020-08-18 22:42:52 +1200 |
|---|---|---|
| committer | Samuel Dobson <[email protected]> | 2020-08-19 00:03:23 +1200 |
| commit | a2a250c7d07bcb80cefca9dd4a7ce57f41291334 (patch) | |
| tree | b01b925d1d9f412d68a9d222e35f02108bd78b4a /src/wallet | |
| parent | Merge #19756: tests: add sync_all to fix race condition in wallet groups test (diff) | |
| parent | -maxapsfee: follow-up fixes (diff) | |
| download | discoin-a2a250c7d07bcb80cefca9dd4a7ce57f41291334.tar.xz discoin-a2a250c7d07bcb80cefca9dd4a7ce57f41291334.zip | |
Merge #19743: -maxapsfee follow-up
7e31ea9fa0a59ced2293057acb14c71ec97db689 -maxapsfee: follow-up fixes (Karl-Johan Alm)
9f77b821764dcaebc97a5ae76c3052936418308d doc: release notes for -maxapsfee (Karl-Johan Alm)
Pull request description:
Addresses feedback from jonatack and meshcollider in #14582.
ACKs for top commit:
jonatack:
ACK 7e31ea9fa0a
meshcollider:
re-ACK 7e31ea9fa0a59ced2293057acb14c71ec97db689
Tree-SHA512: 5d159d78e917e41140e1394bef05e821430dbeac585e9bd708f897041dd7104c2a6b563bfab8b2c85e6d923441160a3880d7864d768aa8e0e66860e0a2c4f56b
Diffstat (limited to 'src/wallet')
| -rw-r--r-- | src/wallet/wallet.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index ac03b3ca9..c132a4be4 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3890,16 +3890,17 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain& chain, } if (gArgs.IsArgSet("-maxapsfee")) { + const std::string max_aps_fee{gArgs.GetArg("-maxapsfee", "")}; CAmount n = 0; - if (gArgs.GetArg("-maxapsfee", "") == "-1") { + if (max_aps_fee == "-1") { n = -1; - } else if (!ParseMoney(gArgs.GetArg("-maxapsfee", ""), n)) { - error = AmountErrMsg("maxapsfee", gArgs.GetArg("-maxapsfee", "")); + } else if (!ParseMoney(max_aps_fee, n)) { + error = AmountErrMsg("maxapsfee", max_aps_fee); return nullptr; } if (n > HIGH_APS_FEE) { warnings.push_back(AmountHighWarn("-maxapsfee") + Untranslated(" ") + - _("This is the maximum transaction fee you pay to prioritize partial spend avoidance over regular coin selection.")); + _("This is the maximum transaction fee you pay (in addition to the normal fee) to prioritize partial spend avoidance over regular coin selection.")); } walletInstance->m_max_aps_fee = n; } |