Post
Topic
Board Announcements (Altcoins)
Re: [ANN][MINT]Mintcoin, Energy Saving Coin With a Fast Distribution *Game
by
JonnyBravo
on 16/02/2014, 20:03:33 UTC
RPC problem; getbalance is broken.

On a mintcoind fresh from git checkout, with synced blockchain:

Code:
someone@somebox:~$ mintcoind listaccounts
{
    "" : 0.00000000,
    "gamebank" : 999999.00000000
}
someone@somebox:~$ mintcoind getbalance gamebank
-9216810327147.70507812
someone@somebox:~$ mintcoind getbalance test
-9216811327146.70507812

This is incorrect. getbalance gamebank should return 999999.0, and getbalance test should return 0.


what os you use? I tried on windows, looks fine to me. It did show my balance.

Yes I see the problem now. The problem only exist if you specific the account name. If you do "mintcoind getbalance", then it shows total correctly, but if you use "mintcoind getbalance acctname" then the displayed number is wrong.

So for your purpose, just use getblance without further arguments, it will be fine.

You don't understand my use case.

I'm a service provider and need this RPC call functional.

Edit: Opened a GitHub issue

If you check coins like Peercoin, there's only functions like getbalance of the whole wallet. You may have several addresses, its own balance usually do not make sense. As when you do a send, the coins may come from multiple of the addresses randomly. You can not say send from this address. Therefore, all you care about is the balance in your wallet in this case. If you want to check each address. Use listaccounts.


getbalance should work with seperate accounts. You can send coins to and from accounts within one wallet, and use getbalance to retrieve the total number of coins from those accounts. I know because I use getbalance regularly with other coins. Many altcoins in fact.

If you're running a service accounts are essential. As someone who has a script that relies on knowing exact account balances on a regular basis I can confirm that if he's unable to get the correct balance from his accounts, then either there's a problem on his end, or with the source.

Indeed Smiley But I've put a workaround in place now for this coin specifically.