Post
Topic
Board Development & Technical Discussion
Re: Bitcoin Qt: lockunspent broken?
by
DannyHamilton
on 28/02/2014, 15:42:39 UTC
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},...