Skip to content

subtractFeeFromOutputs option in fundrawtransaction RPC call is not working as expected on v22.0 #23026

@yurayakimenko

Description

@yurayakimenko

Expected behavior
When I'm trying to send full balance from node to some another address (transaction have many inputs and only one output) on node versions 19.0 and 20.0 - it's working fine. I'm just set amount for transactions equal to node's confirmed balance and set "subtractFeeFromOutputs": [0] for fundrawtransaction RPC call.

So the expected result - node is leaving empty (without balance) after this transaction and fees are subtracted from first input (without any need in manual subtraction and calculation).

Actual behavior
On version 22.0 for the same RPC request (as I wrote above) I got an error -4: Insufficient funds.

To reproduce
Try to send all node's balance in one transaction to some external BTC address with "subtractFeeFromOutputs": [0] option.

System information
Bitcoin Core 22.0
Linux 3.10.0-1160.15.2.el7.x86_64 x86_64
CentOS Linux 7.9.2009

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions