-
Notifications
You must be signed in to change notification settings - Fork 913
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
txprepare destinationAddress:all slow 1 "[\"yourOutpoint\"]" sends everything to the change address #4258
Comments
We were not checking that outputs is indeed an array, and just going ahead creating the array of outputs. Since `tok->size` for a string is 0 we ended up ignoring the argument altogether and thus the created transaction would end up only with a single change output. Fixes ElementsProject#4258
I have reproduced this and fixed it in a branch: https://github.com/cdecker/lightning/tree/issue-4258 Just want to check whether this also solves #4238, since the broken array syntax looks pretty much the same. |
So, if I understand this well, the problem is due to the fact:
The right syntax should be:
Writing this just anyone who maybe experiencing the same problem. |
I'm afraid that is also not quite correct, though with #4259 this would get caught and would return an error message. I allowed myself to fix up your example, so future users can find it easily. The syntax requires the outputs to be a list of dicts, and each dict has a single address as key, and an amount as the corresponding value. We might change that some time soon to remove one nesting (dict of addresses to amounts seems like a good option and corresponds to the format that |
If you're interested, the fix is in 4274985: Malformed arguments would get interpreted as a zero-length array ( |
so:
or
? |
We were not checking that outputs is indeed an array, and just going ahead creating the array of outputs. Since `tok->size` for a string is 0 we ended up ignoring the argument altogether and thus the created transaction would end up only with a single change output. Fixes ElementsProject#4258
We were not checking that outputs is indeed an array, and just going ahead creating the array of outputs. Since `tok->size` for a string is 0 we ended up ignoring the argument altogether and thus the created transaction would end up only with a single change output. Fixes ElementsProject#4258
We were not checking that outputs is indeed an array, and just going ahead creating the array of outputs. Since `tok->size` for a string is 0 we ended up ignoring the argument altogether and thus the created transaction would end up only with a single change output. Fixes ElementsProject#4258
We were not checking that outputs is indeed an array, and just going ahead creating the array of outputs. Since `tok->size` for a string is 0 we ended up ignoring the argument altogether and thus the created transaction would end up only with a single change output. Fixes ElementsProject#4258
We were not checking that outputs is indeed an array, and just going ahead creating the array of outputs. Since `tok->size` for a string is 0 we ended up ignoring the argument altogether and thus the created transaction would end up only with a single change output. Fixes ElementsProject#4258
We were not checking that outputs is indeed an array, and just going ahead creating the array of outputs. Since `tok->size` for a string is 0 we ended up ignoring the argument altogether and thus the created transaction would end up only with a single change output. Fixes #4258
We were not checking that outputs is indeed an array, and just going ahead creating the array of outputs. Since `tok->size` for a string is 0 we ended up ignoring the argument altogether and thus the created transaction would end up only with a single change output. Fixes ElementsProject#4258
Issue and Steps to Reproduce
I have tried to use
txprepare
to send the whole amount of one UTXO to and address of my personal wallet.I have used the syntax on the subject:
The destination address in the output is one of the change addresses of my node.
getinfo
outputThe text was updated successfully, but these errors were encountered: