Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: doldgigger on July 15, 2011, 04:36:47 AM



Title: negative balance - transaction broken now?
Post by: doldgigger on July 15, 2011, 04:36:47 AM
I accidently created a negative balance in one account of my wallet as I sent the complete balance using "sendfrom" and a transaction fee was charged unexpectedly. As I found the transaction would not be processed, I found this thread: http://forum.bitcoin.org/index.php?topic=5909.msg358186 (http://forum.bitcoin.org/index.php?topic=5909.msg358186) and came to the conclusion that I should make the balance positive again by moving funds from other accounts. I did this (having a balance of 0 now on the account where I sent from), but at this point (nearly 2 days later) the transaction is still unconfirmed. Can I still get the transaction processed somehow, or at least recover the funds?


Title: Re: negative balance - transaction broken now?
Post by: kookiekrak on July 15, 2011, 04:47:09 AM
if it didnt process, then either delete your blockchain or rescan it and you'll get your money back


Title: Re: negative balance - transaction broken now?
Post by: Pieter Wuille on July 15, 2011, 11:10:06 AM
Account balances have *no* relation to which coins are available. Coins are always selected from the total pool your bitcoind knows about, accounts are just an accounting tool.

Your total balance (which is the sum of all available coins) will always be positive, and if the client is able to create a transaction, it will be valid (though it could be a double spend, in which case it won't confirm).

In short: just keep your client open and connected, and a wait a bit; the transaction will confirm. The fact that it is slow has nothing to do with account balances in your own client.


Title: Re: negative balance - transaction broken now?
Post by: doldgigger on July 24, 2011, 12:35:27 PM
if it didnt process, then either delete your blockchain or rescan it and you'll get your money back
"Rescanning the blockchain" is done by running bitcoind with the -rescan flag, right? What exactly does it do when it encounters a missing transaction? Will it delete it from the wallet?


Title: Re: negative balance - transaction broken now?
Post by: jackjack on July 24, 2011, 04:43:05 PM
Rescanning the blockchain didn't solve the problem for me (forever unconfirmed transactions too)
I made a little python script, you may try it, it worked for me: https://github.com/jackjack-jj/walletco


Title: Re: negative balance - transaction broken now?
Post by: doldgigger on July 24, 2011, 05:51:27 PM
Account balances have *no* relation to which coins are available. Coins are always selected from the total pool your bitcoind knows about, accounts are just an accounting tool.

Your total balance (which is the sum of all available coins) will always be positive, and if the client is able to create a transaction, it will be valid (though it could be a double spend, in which case it won't confirm).

In short: just keep your client open and connected, and a wait a bit; the transaction will confirm. The fact that it is slow has nothing to do with account balances in your own client.


How long is "a bit"? The transaction is 11 days old by now. I think I have to fix it somehow - normally, transactions go through after one block for me.

By the way, as you are saying that coins are selected from the total pool, does this mean that accounts will not allow me to control which addresses the money I send is taken from? So I will need to have several wallets to do so?