mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Merge #16322: wallet: Fix -maxtxfee check by moving it to CWallet::CreateTransaction
0d101a340ctest: Add test for maxtxfee option (MarcoFalke)177550101bwallet: Remove unreachable code in CreateTransaction (MarcoFalke)5c1b9714cbwallet: Fix -maxtxfee check by moving it to CWallet::CreateTransaction (João Barbosa) Pull request description: Follow up to #16257, this PR makes `bumpfee` aware of `-maxtxfee`. It also prevents dangling locked unspents when calling `fundrawtransaction` - because the previous check was after `LockCoin`. ACKs for top commit: MarcoFalke: re-ACK0d101a340c, only change is small test fixup Tree-SHA512: 3464b24ae7cd4e72ed41438c6661828ba1304af020f05da62720b23668ae734e16cf47c6d97e150cc84ef631ee099b16fc786c858f3d089905845437338fd512
This commit is contained in:
@@ -221,9 +221,12 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
|
||||
return TransactionCreationFailed;
|
||||
}
|
||||
|
||||
// Reject absurdly high fee
|
||||
if (nFeeRequired > m_wallet->getDefaultMaxTxFee())
|
||||
// Reject absurdly high fee. (This can never happen because the
|
||||
// wallet never creates transactions with fee greater than
|
||||
// m_default_max_tx_fee. This merely a belt-and-suspenders check).
|
||||
if (nFeeRequired > m_wallet->getDefaultMaxTxFee()) {
|
||||
return AbsurdFee;
|
||||
}
|
||||
}
|
||||
|
||||
return SendCoinsReturn(OK);
|
||||
|
||||
Reference in New Issue
Block a user