sendasset command generated txid successfully, but some times the address receive the coin and sometimes not.

+1 vote
I created a Coin, And i generated two addresses in wallet. When i send coins to other address sometimes the address receive it successfully and sometimes the coins deducted from my address and transaction completed successfully but the destination address didn't received that can. Why it behaves like this?

sending using this cmd
multichain-cli Bxxxx sendasset 1X8RNUuuBExxxxxxxxxxxxxxxxx xxxxxxCoin 730

first the the address received the 730, when i checked his balance it was 1003, previous balance was 273
but now its not receiving anymore coin, before sending 730 i tried to send 6, 10, 100 but nothing added in the destination address but all these coins got deducted from my total balance.
And Now its not even deducting the balance from address nor sending it to the destination address, but generating the transaction id successfully. Both Addresses are of same node and both have send and receive permissions, i tired to use sendasset from command but the destination address received the Coins but it didn't deducted from the "fromaddress" the fromadress balance is the same as before.
asked Jan 27, 2018 by Zeshan
edited Jan 28, 2018

1 Answer

0 votes

If you use the sendasset API then MultiChain can choose any address to send from, including the one that you are sending the assets to. You should use the sendassetfrom API, which makes the source explicit.

answered Jan 28, 2018 by MultiChain
i tried using sendassetfrom api but the problem is, it sends the asset to address but the amount remains the same in "from" address, lets suppose i have a balance of 500, when i send 250 to an address the address received it successfully and both of the address should have balance of 250 but its like 500 and 250. Why it is so?
Could you please provide a full transcript of the multichain-cli commands and responses which show this phenomenon?
multichain-cli BytePeach sendassetfrom 1Z6gS7C7kjNKq1RZNU5dYiXhhFQPSTpecpdVRm 1X8RNUuuBEPmeWjhgdC9aQG6KPAvAq4Trn13Kf HOCC 25000

i tried this command, both addresses are of same node. first address is the default address and the second one is generated using getnewaddress.
and the response was :
{"method":"sendassetfrom","params":["1Z6gS7C7kjNKq1RZNU5dYiXhhFQPSTpecpdVRm","1X8RNUuuBEPmeWjhgdC9aQG6KPAvAq4Trn13Kf",
"HOCC",25000],"id":1,"chain_name":"BytePeach"}

4bdd0aa3a2b910a987125bc58ee931eec544751e5d05420db916c75d0bdb9582


and when i run gettotalbalances command the results are:

    {
        "name" : "BPC",
        "assetref" : "369-267-18950",
        "qty" : 0.00000000
    },
    {
        "name" : "BytePeachCoin",
        "assetref" : "22-266-1343",
        "qty" : 248060.00000000
    },
    {
        "name" : "HOCC",
        "assetref" : "366-267-24634",
        "qty" : 1000000000.00000000
    },
    {
        "name" : "HopeChainCoin",
        "assetref" : "357-267-25701",
        "qty" : 0.00000000
    },
    {
        "name" : "HCC",
        "assetref" : "363-267-24773",
        "qty" : 100000000.00000000
    }
Thanks but this is not enough to show us the problem. The gettotalbalances command shows the total balance across all addresses owned by the node wallet. You need to try getaddressbalances or getmultibalances to take account of different addresses.
...