-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sendtoaddress is missing a subtractfeefromamount option #1311
Comments
Can I take this issue? |
Sure. For this you will want to create a new function in the txauthor package that performs this behavior, since it would be impossible to add it to the existing NewUnsignedTransaction. Instead of creating the transaction from a slice of outputs, there should only be a single output, and the output amount is decreased by the required fee. |
In the case where change would be dust, should the operation be considered valid? Giving dust-change to the miner seems to conflict with the expected behavior of the recipient fully funding the relay fee. Policy tends towards eliminating dust utxos and could be called out as an edge case in the command's description, but it's not obvious how this should behave by default. |
Increasing the tx fee by leaving off the change output entirely would be the simplest correct way, and it is a rare edge case so I don't see any issues with doing that. |
With this option, the fee is subtracted from the amount paid to the address in the request, rather than subtracting a fee from the change output.
The text was updated successfully, but these errors were encountered: