aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorSjors Provoost <[email protected]>2019-06-28 22:44:38 -0400
committerJoão Barbosa <[email protected]>2019-08-25 02:48:30 +0100
commit8f354ced6e34247477c1b1a56d34e613f6104f0e (patch)
treeac7b1288d2d74e1d19e48c09fc3a9825c62d6939 /src/wallet/wallet.cpp
parentMerge #16608: [0.18] Backport #15911: Use wallet RBF default for walletcreate... (diff)
downloaddiscoin-8f354ced6e34247477c1b1a56d34e613f6104f0e.tar.xz
discoin-8f354ced6e34247477c1b1a56d34e613f6104f0e.zip
0.18: [wallet] abort when attempting to fund a transaction above maxtxfee
FundTransaction calls GetMinimumFee which, when the fee rate is absurdly high, quietly reduced the fee to -maxtxfee. Becaue an absurdly high fee rate is usually the result of a fat finger, aborting seems safer behavior. Github-Pull: #16257 Rebased-From: 806b0052c3b45415862f74f20ba5f389e5b673de
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index b1b2a6316..7a1a3cd41 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -2690,6 +2690,11 @@ bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, int& nC
}
}
+ if (nFeeRet > maxTxFee) {
+ strFailReason = _("Fee exceeds maximum configured by -maxtxfee");
+ return false;
+ }
+
return true;
}