Nothing I send gets confirmed now.
Here’s how I did it:
I was sending out payments under .01 in size and not paying a transaction fee, which of course were never confirmed.
Here’s a guess as to why it broke my wallet:
Because the change leftover was also then never confirmed, yet my client treats it as if it was so includes those amounts in the amounts it sends out.
I’ve only lost 100btc, so I’m not real worried, but if you know how to fix it without too much trouble, that’d be nice.
As you figured out, the root problem is we shouldn’t be counting or spending transactions until they have at least 1 confirmation. 0/unconfirmed transactions are very much second class citizens. At most, they are advice that something has been received, but counting them as balance or spending them is premature.
I made changes so they show up in lighter print, with the credit amount in square brackets like [+1.23], and the amount not counted towards your balance and not available for spending. This doesn’t apply to transactions you sent, which you implicitly trust, since you wrote them.
I didn’t make it (+1.23) because parenthesis in accounting means negative. I hope square brackets is different enough to be clear what is meant.
The JSON-RPC interface can still see 0/unconfirmed if it wants by specifying 0 confirmations.
I uploaded the changes to SVN rev 158. I will post a 0.3.13 RC shortly.
If you have any of these transactions in your wallet, do not send any payments until you’ve upgraded to 0.3.13, which will be coming soon.
If you’ve already sent any of these transactions, or you’re the creator of them, then use theymos’ patch or make the following change and use it to send your clean transactions to a new wallet to clean things up.
change:
if (pcoin->GetDepthInMainChain() < 1 && pcoin->GetDebit() <= 0)
continue;
to:
if (pcoin->GetDepthInMainChain() < 1)
continue;
44,751 total views, 1 views today
https://bitcointalk.org/index.php?topic=1306.msg14714#msg14714