0.18: wallet: Fix -maxtxfee check by moving it to CWallet::CreateTransaction

Github-Pull: #16322
Rebased-From: 5c1b9714cb
This commit is contained in:
João Barbosa
2019-07-02 15:16:36 +01:00
parent 8f354ced6e
commit a11dbaa547
3 changed files with 16 additions and 6 deletions

View File

@@ -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;