mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
[wallet] abort when attempting to fund a transaction above maxtxfee
FundTransaction calls GetMinimumFee which, when the fee rate is absurdly high, quietly reduced the fee to -maxtxfee. Becaue an absurdly high fee rate is usually the result of a fat finger, aborting seems safer behavior.
This commit is contained in:
@@ -221,9 +221,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
|
||||
return TransactionCreationFailed;
|
||||
}
|
||||
|
||||
// reject absurdly high fee. (This can never happen because the
|
||||
// wallet caps the fee at m_default_max_tx_fee. This merely serves as a
|
||||
// belt-and-suspenders check)
|
||||
// Reject absurdly high fee
|
||||
if (nFeeRequired > m_wallet->getDefaultMaxTxFee())
|
||||
return AbsurdFee;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user