mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-20 11:49:07 +02:00
0.18: wallet: Fix -maxtxfee check by moving it to CWallet::CreateTransaction
Github-Pull: #16322
Rebased-From: 5c1b9714cb
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user