mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 02:33:07 +02:00
Merge #16257: [wallet] abort when attempting to fund a transaction above -maxtxfee
806b0052c3[wallet] abort when attempting to fund a transaction above maxtxfee (Sjors Provoost) Pull request description: `FundTransaction` calls `GetMinimumFee` which, when the fee rate is absurdly high, quietly reduces the fee to `-maxtxfee`. Becaue an absurdly high fee rate is usually the result of a fat finger, aborting seems safer behavior. Before: ``` bitcoin-cli walletcreatefundedpsbt '[]' '[{"tb1q...": 0.01}]' 0 '{"feeRate": 10}' true { "psbt": "cHNidP8...gAA=", "fee": 0.10000000, "changepos": 1 } ``` After: ``` bitcoin-cli walletcreatefundedpsbt '[]' '[{"tb1q...": 0.01}]' 0 '{"feeRate": 10}' true error code: -25 error message: Fee exceeds maximum configured by -maxtxfee ``` QT still checks the max fee rate as expected: <img width="566" alt="Schermafbeelding 2019-06-20 om 19 52 00" src="https://user-images.githubusercontent.com/10217/59888424-a2aa7100-9395-11e9-8ae6-8a3c1f7de585.png"> ACKs for top commit: laanwj: Code review ACK806b0052c3Tree-SHA512: bee95811711cdab100b614d2347921407af3b400aea613ca156953ed3f60b924ad29a1d335bd0e240c0b7c0fbb360226bab03294d226a5560cdf2a3f21e6d406
This commit is contained in:
6
doc/release-notes-0.18.1-16257.md
Normal file
6
doc/release-notes-0.18.1-16257.md
Normal file
@@ -0,0 +1,6 @@
|
||||
Wallet changes
|
||||
--------------
|
||||
When creating a transaction with a fee above `-maxtxfee` (default 0.1 BTC),
|
||||
the RPC commands `walletcreatefundedpsbt` and `fundrawtransaction` will now fail
|
||||
instead of rounding down the fee. Beware that the `feeRate` argument is specified
|
||||
in BTC per kilobyte, not satoshi per byte.
|
||||
Reference in New Issue
Block a user