diff options
| author | João Barbosa <[email protected]> | 2019-07-02 15:16:36 +0100 |
|---|---|---|
| committer | João Barbosa <[email protected]> | 2019-08-25 02:51:07 +0100 |
| commit | a11dbaa547ec01e7e11ca4dbe2433e7d987c82bb (patch) | |
| tree | c00d28c6ebf7bd8a9636e5ae154af96fd501dcb4 /src/wallet/wallet.cpp | |
| parent | 0.18: [wallet] abort when attempting to fund a transaction above maxtxfee (diff) | |
| download | discoin-a11dbaa547ec01e7e11ca4dbe2433e7d987c82bb.tar.xz discoin-a11dbaa547ec01e7e11ca4dbe2433e7d987c82bb.zip | |
0.18: wallet: Fix -maxtxfee check by moving it to CWallet::CreateTransaction
Github-Pull: #16322
Rebased-From: 5c1b9714cb0a13be28324f91f4ec9ca66a1de8c7
Diffstat (limited to 'src/wallet/wallet.cpp')
| -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 7a1a3cd41..1c387594a 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2690,11 +2690,6 @@ bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, int& nC } } - if (nFeeRet > maxTxFee) { - strFailReason = _("Fee exceeds maximum configured by -maxtxfee"); - return false; - } - return true; } @@ -3131,6 +3126,11 @@ bool CWallet::CreateTransaction(interfaces::Chain::Lock& locked_chain, const std } } + 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; |