diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-07-02 15:16:36 +0100 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-07-02 16:13:39 +0100 |
commit | 5c1b9714cb0a13be28324f91f4ec9ca66a1de8c7 (patch) | |
tree | 19c93e0e2cfb83d78d8646bf517b593b4c5ac667 /src/qt/walletmodel.cpp | |
parent | 6c21a801f3df4942d09d5a33d3dab04807f7bb37 (diff) |
wallet: Fix -maxtxfee check by moving it to CWallet::CreateTransaction
Diffstat (limited to 'src/qt/walletmodel.cpp')
-rw-r--r-- | src/qt/walletmodel.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index c1eba61749..6f16834109 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -221,9 +221,12 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact return TransactionCreationFailed; } - // Reject absurdly high fee - if (nFeeRequired > m_wallet->getDefaultMaxTxFee()) + // Reject absurdly high fee. (This can never happen because the + // wallet never creates transactions with fee greater than + // m_default_max_tx_fee. This merely a belt-and-suspenders check). + if (nFeeRequired > m_wallet->getDefaultMaxTxFee()) { return AbsurdFee; + } } return SendCoinsReturn(OK); |