Negative Dogecoin Balances?

4

Through dogecoin-cli, I sent half the dogecoins I own to an external address. Now, when I call the listaccounts function, I get this:

[root@web ~]# ./dogecoin-cli listaccounts
{
    "" : -25001.00000000,
    "doge" : 48136.85072100
}

Notice how the "" has -25001.00000000. I am using a query from php to get the balance of "doge" and display it to users. That returns 48136.85072100, which is a problem, because I only have 23135.85072100 doge. How can I fix this problem? Thanks!

Jordan

Posted 2014-11-18T03:35:27.813

Reputation: 41

This is a problem general to all Bitcoin-derivatives. Perhaps you should edit your question to make it more general.Nick ODell 2014-11-18T04:28:46.403

If you have multiple accounts: use sendfrom to send from a specific account. If you don't care about the accounts, use getbalanceTheDoctor 2014-11-18T23:38:58.380

Answers

2

Problem

rricci2009 commented:

After few transaction by sendtoaddress command, balance in "" became negative. I solved with the "move" command from another account to "". [...]

Cause

sipa commented:

That is expected behavior, if your incoming transactions credit accounts other than "", but outgoing transactions debit account "" (the default if you're not using sendfrom), the "" account will go negative. [...]

Mitigation

Tectract commented:

[...] So, is there a way to do something like a sendtoaddress command that won't leave me with odd negative balances?

gavinandresen commented:

Use the sendfrom RPC command.

And you can use the move RPC command to reset account balances to what you expect (and listaccounts to see all accounts / balances)

Source.

Nick ODell

Posted 2014-11-18T03:35:27.813

Reputation: 26 536