From 0e7c7465bf2b9911da094d9790480f94e158f9a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Barbosa?= Date: Tue, 2 Jul 2019 15:16:36 +0100 Subject: wallet: Fix -maxtxfee check by moving it to CWallet::CreateTransaction Github-Pull: #16322 Rebased-From: 5c1b9714cb0a13be28324f91f4ec9ca66a1de8c7 --- src/wallet/wallet.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/wallet') 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& 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; -- cgit v1.2.3