preparelockunspent vs lockunspent

+1 vote
preparelockunspent is only in-memory while lockunspent is on chain. What is the need for having preparelockunspent then? Why not just lockunspent?
asked Mar 12, 2017 by kakkoiiman

1 Answer

0 votes

First, it's the other way round - lockunspent affects the local node's behavior only, while preparelockunspent also performs a transaction on the blockchain

The main purpose of preparelockunspent is to place a specific quantity of asset(s) and/or the native currency (if you have one) in a single unspent transaction output. This is helpful for building exchange transactions. Indeed, you can pass a parameter to preparelockunspent so it only does the "prepare" part, and not the "lock".

answered Mar 12, 2017 by MultiChain
...