diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-07-02 15:16:36 +0100 |
---|---|---|
committer | Sjors Provoost <sjors@sprovoost.nl> | 2019-08-19 16:19:00 +0200 |
commit | 0e7c7465bf2b9911da094d9790480f94e158f9a5 (patch) | |
tree | 9ed3154604d16f6a60e2a55a41a5197f61d1b7dd /src | |
parent | e9adb96f8854d21a02d80b4295f1a2e57579cc18 (diff) | |
download | bitcoin-0e7c7465bf2b9911da094d9790480f94e158f9a5.tar.xz |
wallet: Fix -maxtxfee check by moving it to CWallet::CreateTransaction
Github-Pull: #16322
Rebased-From: 5c1b9714cb0a13be28324f91f4ec9ca66a1de8c7
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 92dc0f5d31..d5f5df381a 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2671,11 +2671,6 @@ bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, int& nC } } - if (nFeeRet > maxTxFee) { - strFailReason = _("Fee exceeds maximum configured by -maxtxfee"); - return false; - } - return true; } @@ -3080,6 +3075,11 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CTransac } } + if (nFeeRet > maxTxFee) { + strFailReason = _("Fee exceeds maximum configured by -maxtxfee"); + return false; + } + if (gArgs.GetBoolArg("-walletrejectlongchains", DEFAULT_WALLET_REJECT_LONG_CHAINS)) { // Lastly, ensure this tx will pass the mempool's chain limits LockPoints lp; |