Skip to content
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

Open
jrick opened this issue Oct 25, 2018 · 4 comments · May be fixed by #1370
Open

sendtoaddress is missing a subtractfeefromamount option #1311

jrick opened this issue Oct 25, 2018 · 4 comments · May be fixed by #1370

Comments

@jrick
Copy link
Member

jrick commented Oct 25, 2018

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.

@sefbkn
Copy link
Member

sefbkn commented Nov 10, 2018

Can I take this issue?

@jrick
Copy link
Member Author

jrick commented Nov 12, 2018

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.

@sefbkn
Copy link
Member

sefbkn commented Jun 19, 2019

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.

@jrick
Copy link
Member Author

jrick commented Jun 19, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants