Author

Topic: Bitcoin Qt: lockunspent broken? (Read 1182 times)

member
Activity: 91
Merit: 10
March 17, 2014, 06:21:00 PM
#10
Doing further research it seems that 0.9 seems to have coin control. That's great news!
member
Activity: 91
Merit: 10
March 17, 2014, 05:51:51 PM
#9
As a feature request, it would be useful to have the ability to lock all outputs except for a given list of outputs. That would make it easy to send from a specific output bypassing the usual coin selection logic.

If you need to send from a specific output, easiest to use coin control or raw transaction API.

Googling for "coin control" it seems that this is a non-standard feature not available in the official Bitcoin-qt. I do not like to trust other clients or branches. I'd like to have that feature available, though. Better than locking outputs.

Raw transactions seem error-prone to me. One mistake and the coins are gone.
legendary
Activity: 1596
Merit: 1100
March 17, 2014, 04:14:32 PM
#8
As a feature request, it would be useful to have the ability to lock all outputs except for a given list of outputs. That would make it easy to send from a specific output bypassing the usual coin selection logic.

If you need to send from a specific output, easiest to use coin control or raw transaction API.
member
Activity: 91
Merit: 10
March 17, 2014, 06:04:05 AM
#7
Looks like I passed in true instead of false. With your example I tested it to work. Thanks!

As a feature request, it would be useful to have the ability to lock all outputs except for a given list of outputs. That would make it easy to send from a specific output bypassing the usual coin selection logic.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
March 17, 2014, 03:14:58 AM
#6
Rather confusing command syntax might be the problem - try a "false" rather than a "true" by the looks of it.
staff
Activity: 4284
Merit: 8808
March 17, 2014, 03:05:46 AM
#5
Works fine here:


[gmaxwell@helmholtz tmp]$ bitcoin-cli listlockunspent
[
]
[gmaxwell@helmholtz tmp]$ bitcoin-cli lockunspent false '[{"txid":"76a914a86e8ee2a05a44613904e18132e49b2448adc4e688ac","vout":0}]'
true
[gmaxwell@helmholtz tmp]$ bitcoin-cli listlockunspent
[
    {
        "txid" : "0000000000000076a914a86e8ee2a05a44613904e18132e49b2448adc4e688ac",
        "vout" : 0
    }
]
[gmaxwell@helmholtz tmp]$ bitcoin-cli lockunspent true '[{"txid":"76a914a86e8ee2a05a44613904e18132e49b2448adc4e688ac","vout":0}]'
true
[gmaxwell@helmholtz tmp]$ bitcoin-cli listlockunspent
[
]
[gmaxwell@helmholtz tmp]$
newbie
Activity: 5
Merit: 0
March 17, 2014, 02:53:21 AM
#4
I got this:
Code:
Error: Error parsing JSON:ture
member
Activity: 91
Merit: 10
February 28, 2014, 11:32:45 AM
#3
Yes, I did this. When I initially left it out I received an error. After filling it in the error went away.
legendary
Activity: 3472
Merit: 4801
February 28, 2014, 10:42:39 AM
#2
In Bitcoin Qt, I tried to lock unspent outputs. My intention was to lock all but one to force a particular output to be selected for a transaction.

I understand it should work like this:

  • call lockunspent with a list of outputs
  • call listlockunspent and observe that all specified outputs are actually locked

Unfortunately, none are locked in my testing. What am I doing wrong? There was no error message. I entered the command in the debug window.

Edit: I reviewed the source code and I did not find any obvious usage errors on my part. Debugging the client is beyond my abilities, though.

I haven't used it yet, but don't you need to pass a parameter of "true" when calling lockunspent?

Code:
lockunspent true [list of outputs]

Where list of outputs is in the format:

{"txid":txid,"vout":n},...
member
Activity: 91
Merit: 10
February 28, 2014, 08:12:39 AM
#1
In Bitcoin Qt, I tried to lock unspent outputs. My intention was to lock all but one to force a particular output to be selected for a transaction.

I understand it should work like this:

  • call lockunspent with a list of outputs
  • call listlockunspent and observe that all specified outputs are actually locked

Unfortunately, none are locked in my testing. What am I doing wrong? There was no error message. I entered the command in the debug window.

Edit: I reviewed the source code and I did not find any obvious usage errors on my part. Debugging the client is beyond my abilities, though.
Jump to: