Author

Topic: [BUG] Wrong balance displayed (Read 1247 times)

hero member
Activity: 700
Merit: 500
May 12, 2012, 08:43:23 PM
#7
Do you get different answers for 'getbalance'  versus 'getbalance "*"' ?
getbalance() returns the wrong balance, lacking 0.018btc in my case
getbalance("*") returns the correct value, just like summing everything up in a spreadsheet does

Quote
getbalance and getbalance '*' can return different amounts for 0-confirmation transactions, because of the way change transactions are counted.
However, the blockchain is up to date and the transaction is confirmed.

Since I wasn't too clear about it in my first post, I sent more than the 0.018btc. Sorry if that caused a confusion.

Is "(n/a)" instead of the target address in the transaction window normal?

I'm not really sure about how the different accounts in a wallet work but maybe that's your problem.
hero member
Activity: 576
Merit: 514
May 12, 2012, 01:18:44 PM
#6
Do you get different answers for 'getbalance'  versus 'getbalance "*"' ?
getbalance() returns the wrong balance, lacking 0.018btc in my case
getbalance("*") returns the correct value, just like summing everything up in a spreadsheet does

Quote
getbalance and getbalance '*' can return different amounts for 0-confirmation transactions, because of the way change transactions are counted.
However, the blockchain is up to date and the transaction is confirmed.

Since I wasn't too clear about it in my first post, I sent more than the 0.018btc. Sorry if that caused a confusion.

Is "(n/a)" instead of the target address in the transaction window normal?
legendary
Activity: 1652
Merit: 2216
Chief Scientist
May 12, 2012, 11:52:00 AM
#5
Do you get different answers for 'getbalance'  versus 'getbalance "*"' ?

There is a longstanding issue with they way unconfirmed transactions are counted that might be the source of your problem:
  https://github.com/bitcoin/bitcoin/issues/172
hero member
Activity: 700
Merit: 500
May 12, 2012, 11:32:41 AM
#4
Make sure you have all the blocks in your client.
Blockcount doesn't really matter. As said, I checked without a blockchain and network access. The sums are just listed as unconfirmed instead.

It does matter.
hero member
Activity: 576
Merit: 514
May 12, 2012, 10:28:57 AM
#3
Make sure you have all the blocks in your client.
Blockcount doesn't really matter. As said, I checked without a blockchain and network access. The sums are just listed as unconfirmed instead.
hero member
Activity: 700
Merit: 500
May 12, 2012, 10:18:10 AM
#2
I've been playing around with pywallet and dumped a private key of one of my addresses. Then I imported it into a brand new wallet and ran a rescan which worked just fine. From that wallet, I sent everything to a new address in my main wallet (via the newest client), closed the client and started my old client with a rescan again which ended up with a "Payment to yourself" entry. Looking at the transaction details, the debit and credit values are identical, without any fees.

At that point I noticed that my balance was less than before.

So I started a XP machine without network and opened the backup wallet and the current wallet in the 0.6.2 client (without a blockchain). The difference is exactly 0.018btc.

To investigate this, I exported all transactions of both wallets into two csv files, opened them in a spreadsheet and summed up the transactions: both results are identical, not missing the 0.018btc.

It seems like the client has a bug when it sums up transactions which contain a transaction to yourself. Also, it does not display the receiving address/account, making it impossible to keep track of the target. Even if I search for the address I sent the coins to in the transaction list there are no results. However blockexplorer.com/blockchain.info show the address; it would be really handy to have the official client diplay it too.


Make sure you have all the blocks in your client.
hero member
Activity: 576
Merit: 514
May 12, 2012, 10:00:28 AM
#1
I've been playing around with pywallet and dumped a private key of one of my addresses. Then I imported it into a brand new wallet and ran a rescan which worked just fine. From that wallet, I sent everything to a new address in my main wallet (via the newest client), closed the client and started my old client with a rescan again which ended up with a "Payment to yourself" entry. Looking at the transaction details, the debit and credit values are identical, without any fees.

At that point I noticed that my balance was less than before.

So I started a XP machine without network and opened the backup wallet and the current wallet in the 0.6.2 client (without a blockchain). The difference is exactly 0.018btc.

To investigate this, I exported all transactions of both wallets into two csv files, opened them in a spreadsheet and summed up the transactions: both results are identical, not missing the 0.018btc.

It seems like the client has a bug when it sums up transactions which contain a transaction to yourself. Also, it does not display the receiving address/account, making it impossible to keep track of the target. Even if I search for the address I sent the coins to in the transaction list there are no results. However blockexplorer.com/blockchain.info show the address; it would be really handy to have the official client diplay it too.
Jump to: