includeWatchonly param of getbalance don't work

+1 vote

a11:  getmultibalances * * 1 true    //  getmultibalances includewatchonly false "" is 1
{"method":"getmultibalances","params":["*","*",1,false],"id":1,"chain_name":"a11"}

{
    "1DeHcUNHuyb3kgWVWaamB6YFNxttSc7StFXXVM" : [
        {
            "name" : "aaa",
            "assetref" : "57-299-4108",
            "qty" : 6
        },
        {
            "assetref" : "",
            "qty" : 1,
            "raw" : 1
        }
    ],
    "total" : [
        {
            "name" : "aaa",
            "assetref" : "57-299-4108",
            "qty" : 6
        },
        {
            "assetref" : "",
            "qty" : 1,
            "raw" : 1
        }
    ]
}

 

 

a11: getmultibalances * * 1 true    //  getmultibalances includewatchonly true "" is 178
{"method":"getmultibalances","params":["*","*",1,true],"id":1,"chain_name":"a11"}

{
    "1aPeoFDxUH9EeXnuVtSPdeNB6v1nyHnuQKZn8C" : [
        {
            "name" : "bbb",
            "assetref" : "68-300-55337",
            "qty" : 10
        },
        {
            "name" : "ccc",
            "assetref" : "68-569-27492",
            "qty" : 10
        },
        {
            "name" : "aaa",
            "assetref" : "57-299-4108",
            "qty" : 9985
        },
        {
            "assetref" : "",
            "qty" : 177,
            "raw" : 177
        }
    ],
    "1DeHcUNHuyb3kgWVWaamB6YFNxttSc7StFXXVM" : [
        {
            "name" : "aaa",
            "assetref" : "57-299-4108",
            "qty" : 6
        },
        {
            "assetref" : "",
            "qty" : 1,
            "raw" : 1
        }
    ],
    "total" : [
        {
            "name" : "bbb",
            "assetref" : "68-300-55337",
            "qty" : 10
        },
        {
            "name" : "ccc",
            "assetref" : "68-569-27492",
            "qty" : 10
        },
        {
            "name" : "aaa",
            "assetref" : "57-299-4108",
            "qty" : 9991
        },
        {
            "assetref" : "",
            "qty" : 178,
            "raw" : 178
        }
    ]
}

and run getbalance 

a11: getbalance * 1 true
{"method":"getbalance","params":["*",1,true],"id":1,"chain_name":"a11"}

178
a11: getbalance * 1 false
{"method":"getbalance","params":["*",1,false],"id":1,"chain_name":"a11"}

178

thx

asked Aug 1, 2018 by liutao0532dev

2 Answers

0 votes
Thanks for reporting this. This is a rarely-used API in MultiChain but you are right that it seems to display the wrong value. We'll look into fixing this in the next maintenance release.
answered Aug 2, 2018 by MultiChain
0 votes
This is fixed in version 1.0.6 of MultiChain, just released. The fix will also be included in 2.0 alpha 4 to be released next week.
answered Aug 3, 2018 by MultiChain
...