Locked outputs in atomic exchange are not cleared upon completion of the exchange

+1 vote
The locked outputs involved in an atomic exchange between 2 parties, are showing up in the output of the listlockunspent command even after the exchange has successfully completed.

I have verified that double-spending is not possible on this output even after unlocking the output manually. But shouldn't the "locked" flag (or whatever that's still marking this output as "locked") for this output be cleared after the exchange is successful?
asked Apr 6, 2017 by Cypher
edited Apr 6, 2017 by Cypher
We're looking into this and will respond shortly.

1 Answer

+1 vote
 
Best answer

Thanks, we can confirm this issue. It's not actually specific to exchanges, but true of any locked output that is subsequently spent. This behavior was inherited from Bitcoin Core and we need to evaluate whether or not we think it should be changed for the next beta. While we agree it doesn't make a great deal of sense, we also maintain a goal of preserving compatibility with the Bitcoin Core API. In the meantime you can manually unlock it as a workaround, for example a simple lockunspent true unlocks all outputs.

answered Apr 8, 2017 by MultiChain
selected Apr 9, 2017 by Cypher
Thanks. That's exactly the workaround I've implemented in my application currently.
lockunspent true; is work. but is there any way work around to unlock the specific tx id ?
Yes, see the next parameter to lockunspent, documented here: https://www.multichain.com/developers/json-rpc-api/
...