When I send all coins from my wallet the displayed balance on the overviewpage is not updated. After a restart it's fine. Seems like a missing SIGNAL-handling?
-
Diapolo commented at 4:43 PM on June 13, 2012: none
-
laanwj commented at 5:48 PM on June 13, 2012: member
Was the transaction shown in the transaction list? Did it generate a notification?
-
Diapolo commented at 8:49 PM on June 13, 2012: none
The transaction was shown imediately on overviewpage and in the transaction list and I received a notification-message.
-
laanwj commented at 9:26 PM on June 13, 2012: member
I don't understand what happened, then. The balances are recomputed and updated after every wallet update in WalletModel::updateTransaction. A spend immediately count towards the balance, so after the recompute the balance should have been 0. If the signal would have been lost, the transaction would have been completely invisible...
Do we maybe special-case the balance "0" somewhere? Maybe there is somehow a bug that makes it impossible for the balance to go back to absolute zero?
The way to test this (without actually spending) would be to inject into WalletModel
emit balanceChanged(0, 0, 0);on a timer after a certain while.... (or some other way)
-
Diapolo commented at 5:00 AM on June 14, 2012: none
I'm going to try this later and will report back.
-
Diapolo commented at 5:56 PM on June 14, 2012: none
Strange tried it with the last official 0.6.2, which worked. Need to take another look at it with current master build.
-
Diapolo commented at 6:41 PM on June 15, 2012: none
@laanwj I was able to reproduce this again, had 0.955402 BTC in my wallet and sent them all to another address in a different wallet. The transaction was shown as tray-notification, is visible in the transaction-list and on the overviewpage. But the balance on overviewpage AND send coins still shows 0.955402 BTC.
Block-chain was up-to-date before sending and I was on normal net. Used a custom build based on master. Can you perhaps try to re-create the scenario and test it out?
Edit: The number of transactions was updated, too ... a client-restart leads to a display of the correct values for balance.
-
Diapolo commented at 6:48 PM on June 15, 2012: none
This is the part of the happening from the debug.log:
<pre> 06/15/12 18:35:25 WalletUpdateSpent found spent coin 0.955402bc 8b842333c58e9a2320c49f585a3b08bc508ebf5e95ca07689e92c831bb994977 06/15/12 18:35:25 NotifyTransactionChanged 8b842333c58e9a2320c49f585a3b08bc508ebf5e95ca07689e92c831bb994977 status=1 06/15/12 18:35:25 NotifyTransactionChanged 3a327bc4c5a42c3ede3839213d5abe42a2dccf1189e8aedde4c68fb9452cdb59 status=0 06/15/12 18:35:25 NotifyTransactionChanged 8b842333c58e9a2320c49f585a3b08bc508ebf5e95ca07689e92c831bb994977 status=1 06/15/12 18:35:25 Rate limit dFreeCount: 3422.62 => 3614.62 06/15/12 18:35:25 CTxMemPool::accept() : accepted 3a327bc4c5 (poolsz 42) 06/15/12 18:35:25 Relaying wtx 3a327bc4c5 06/15/12 18:35:25 updateWallet 8b842333c58e9a2320c49f585a3b08bc508ebf5e95ca07689e92c831bb994977 1 06/15/12 18:35:25 inWallet=1 inModel=1 Index=25-26 showTransaction=1 derivedStatus=1 06/15/12 18:35:25 updateWallet 3a327bc4c5a42c3ede3839213d5abe42a2dccf1189e8aedde4c68fb9452cdb59 0 06/15/12 18:35:25 inWallet=1 inModel=0 Index=13-13 showTransaction=1 derivedStatus=0 06/15/12 18:35:25 updateWallet 8b842333c58e9a2320c49f585a3b08bc508ebf5e95ca07689e92c831bb994977 1 06/15/12 18:35:25 inWallet=1 inModel=1 Index=26-27 showTransaction=1 derivedStatus=1 </pre>
-
Diapolo commented at 6:50 PM on June 15, 2012: none
Can it be related to NotifyTransactionChanged() and the use of a Qt::QueuedConnection?
-
laanwj commented at 8:21 PM on June 15, 2012: member
No. The notification survives intact, otherwise you wouldn't get a notification at all and it wouldn't show up in the transaction list. The function you should watch is WalletModel::updateTransaction, the recomputation of the balance, and whether the balanceChanged(0,0,0) signal is emitted and processed correctly.
Did you check what I proposed?
-
Diapolo commented at 9:56 PM on June 24, 2012: none
@laanwj I think this is related to the problem with immature balances display. I tried your suggestion and placed an
emit balanceChanged(0, 0, 0);on a timer, which when fired, correctly updates the balance.Today I had the main problem again, sent all coins from the wallet (a Tx fee was included), got a tray-notification, Tx shows up in the list, but balance display on overviewpage doesn't change.
-
laanwj commented at 7:51 AM on July 8, 2012: member
I hope so. As it updates the balance with a timer, it should eventually get it right.
- Diapolo closed this on Jul 8, 2012
- Diapolo reopened this on Jul 8, 2012
-
Diapolo commented at 8:44 PM on July 8, 2012: none
Sorry, I have to re-open, as on testnet, this was happening again.
-
laanwj commented at 9:03 PM on July 8, 2012: member
Need to check: does a sent transaction count toward the balance immediately or only after it was sent to a peer node?
Seems like the only explanation I can think of that the new outgoing transaction is not taken into account in the balance computation afterwards.
-
Diapolo commented at 9:06 PM on July 8, 2012: none
Did you try out the testnet3? It is rather weird as currently I can't seem to get it fully synced (too many old nodes I guess). Perhaps this is related?
Edit: Needs an outgoing Tx confirmations before it counts? I'm also not sure if the display was updated in the send-coins dialog (there is a small label for this).
- laanwj referenced this in commit 326d51b36b on Jul 10, 2012
- laanwj referenced this in commit 2e00b8fbd9 on Jul 11, 2012
- Diapolo closed this on Jul 13, 2012
- nifgraup referenced this in commit b1ce7afe5e on Mar 30, 2014
- suprnurd referenced this in commit b7822464f6 on Dec 5, 2017
- lateminer referenced this in commit c5755e5ac0 on Jan 22, 2019
- lateminer referenced this in commit a86ee0f271 on May 6, 2020
- MarcoFalke locked this on Sep 8, 2021