Post
Topic
Board Announcements (Altcoins)
Re: [ANN][MINT]Mintcoin, Energy Saving Coin With a Fast Distribution *Game
by
valley365
on 16/02/2014, 18:58:37 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.