aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletmodel.cpp
diff options
context:
space:
mode:
authorSjors Provoost <sjors@sprovoost.nl>2019-06-28 22:44:38 -0400
committerSjors Provoost <sjors@sprovoost.nl>2019-06-28 22:44:38 -0400
commit806b0052c3b45415862f74f20ba5f389e5b673de (patch)
treef8acbb20ec282a28fb0eba331a4e81d6a75872e4 /src/qt/walletmodel.cpp
parent7400135b7918df9c34206bead744c496e07b0e78 (diff)
[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.
Diffstat (limited to 'src/qt/walletmodel.cpp')
-rw-r--r--src/qt/walletmodel.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index a2b295df21..c1eba61749 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -221,9 +221,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
return TransactionCreationFailed;
}
- // reject absurdly high fee. (This can never happen because the
- // wallet caps the fee at m_default_max_tx_fee. This merely serves as a
- // belt-and-suspenders check)
+ // Reject absurdly high fee
if (nFeeRequired > m_wallet->getDefaultMaxTxFee())
return AbsurdFee;
}