preparelockunspend always return "Transaction output value too small"

+1 vote
Hello guys,  I'm building a POC using multichain and now I'm tryting to "exchange" an asset against anoter one.  Like you exchange 1000 bananas for a crate of banana.
The issue I have is I can't even start the preparation of the atomic transaction because as soon I try to lock the unspent, I receive an error : 
Transaction output value too small.
I've search a lot but can't figure out what that error means ! I see the code is -8, and in the doc, -8 mean RPC_INVALID_PARAMETER...
Any hint are welcome ! Thx
mesh-blockchain3: gettotalbalances

        "name" : "banana-asset",
        "assetref" : "154-301-18445",
        "qty" : 1000.00000000
        "name" : "crate-asset",
        "assetref" : "199-301-39554",
        "qty" : 2.00000000
mesh-blockchain3: preparelockunspent '{"banana-asset":250}'          

error code: -8
error message:
Transaction output value too small
asked Mar 4, 2018 by Marco

1 Answer

0 votes

The most likely explanation is that you have a non-zero minimum-per-output value in your blockchain parameters, so you need to include some of the native currency in the output you're preparing. For example this will include 0.001 units of the native currency in the output:

preparelockunspent '{"banana-asset":250, "":0.001}'
answered Mar 5, 2018 by MultiChain