Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: -Alex68- on May 12, 2016, 12:06:23 PM



Title: Never confirmed transaction, how to get it back in the wallet ?
Post by: -Alex68- on May 12, 2016, 12:06:23 PM
Hi,

I've done a transaction without any fee 22 days ago, and of course it never get confirmed. Now I wonder how I can get it back in my wallet.
All the information I have is the amount, date, the receiver address and the transaction ID : 51b59008bdd688eefcfe29ac82ca8494f5ec7709a9c106ab72f54cbf1470cf58-000
However, this is not recognized on blockchain.info.
I used Bitcoin-Qt 5.2.1 (next versions are no more compatible with my OS), and it is fully synchronized, but it is still showing "not confirmed".

Do you have any idea about what I should do ?

Thank you !


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: merelcoin on May 12, 2016, 12:09:05 PM
Strange,

I cannot find this transaction in blockchain.info or blockr.io.
Nevertheless, your wallet probably keeps on broadcasting the transaction, you can fix this by starting your wallet with the zapwallet argument. It'll rescan the chain, and only pickup the confirmed tx's.
You could also attempt to create a double spend with a higher fee using the same inputs you used for the stuck transaction.


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: killerjoegreece on May 12, 2016, 12:12:48 PM
what os are you on? your client might be way too outdated to work in the network.


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: achow101 on May 12, 2016, 12:13:59 PM
Because the transaction is very old and remained unconfirmed, the network dropped the transaction. Block explorers don't show it anymore because they "forgot" it.

The solution is to start bitcoin core with the -zapwallettxes option. How to do this depends on your OS. As merelcoin said, it will clear the unconfirmed transactions from your wallet and allow you to resend the coins.


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: cr1776 on May 12, 2016, 01:35:27 PM
what os are you on? your client might be way too outdated to work in the network.

The "Bitcoin-Qt 5.2.1" isn't a bitcoin version, it may be a Qt version though.  As stated above, it would be useful to know which version of Bitcoin you are using.  It would be 0.something.


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: -Alex68- on May 12, 2016, 04:56:48 PM
Thank you all for your quick answers.

This is indeed Qt version 5.2.1, Bitcoin Core version 0.10.2, running with Mac OS X version 10.6.8
Could you explain me how to use this zapwallet option ?


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: achow101 on May 12, 2016, 07:47:13 PM
Thank you all for your quick answers.

This is indeed Qt version 5.2.1, Bitcoin Core version 0.10.2, running with Mac OS X version 10.6.8
Could you explain me how to use this zapwallet option ?
Open the terminal. Type
Code:
bitcoin-qt -zapwallettxes
Hit enter. Bitcoin Core will start and it will do everything it needs to do. Once its fully up, you should see that the unconfirmed transaction is gone. Shut it down and start Bitcoin Core normally.


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: -Alex68- on May 12, 2016, 08:27:24 PM
Thank you, I tried it but this is not the right command.

I manage to open Bitcoin Core typing

Code:
open -a Bitcoin-qt

But if y try to insert the option, I get the following error message :

Code:
$ open -a Bitcoin-qt -zapwallettxes
open: unrecognized option `-zapwallettxes'
Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames] [--args arguments]
Help: Open opens files from a shell.
      By default, opens each file using the default application for that file. 
      If the file is in the form of a URL, the file will be opened as a URL.
Options:
      -a                Opens with the specified application.
      -b                Opens with the specified application bundle identifier.
      -e                Opens with TextEdit.
      -t                Opens with default text editor.
      -f                Reads input from standard input and opens with TextEdit.
      -R, --reveal      Selects in the Finder instead of opening.
      -W, --wait-apps   Blocks until the used applications are closed (even if they were already running).
          --args        All remaining arguments are passed in argv to the application's main() function instead of opened.
      -n, --new         Open a new instance of the application even if one is already running.
      -g, --background  Does not bring the application to the foreground.
      -h, --header      Searches header file locations for headers matching the given filenames, and opens them.

I have also tried
Code:
$ open -a Bitcoin-qt --args zapwallettxes
which opens Bitcoin Core but it doesn't seem to change anything.


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: achow101 on May 12, 2016, 08:29:19 PM
Thank you, I tried it but this is not the right command.

I manage to open Bitcoin Core typing

Code:
open -a Bitcoin-qt

But if y try to insert the option, I get the following error message :

Code:
$ open -a Bitcoin-qt -zapwallettxes
open: unrecognized option `-zapwallettxes'
Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames] [--args arguments]
Help: Open opens files from a shell.
      By default, opens each file using the default application for that file. 
      If the file is in the form of a URL, the file will be opened as a URL.
Options:
      -a                Opens with the specified application.
      -b                Opens with the specified application bundle identifier.
      -e                Opens with TextEdit.
      -t                Opens with default text editor.
      -f                Reads input from standard input and opens with TextEdit.
      -R, --reveal      Selects in the Finder instead of opening.
      -W, --wait-apps   Blocks until the used applications are closed (even if they were already running).
          --args        All remaining arguments are passed in argv to the application's main() function instead of opened.
      -n, --new         Open a new instance of the application even if one is already running.
      -g, --background  Does not bring the application to the foreground.
      -h, --header      Searches header file locations for headers matching the given filenames, and opens them.

I have also tried
Code:
$ open -a Bitcoin-qt --args zapwallettxes
which opens Bitcoin Core but it doesn't seem to change anything.
You don't need the open command. Bitcoin-qt by itself is an executable and can be executed from the terminal.


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: -Alex68- on May 12, 2016, 08:49:35 PM
Hm... I have the feeling that I can't use the terminal well enough, it doesn't recognize the commande bitcoin-qt.
I can go in the right folder Applications where there is the .app file and open it, or use the command open, but I don't manage to execute it in another way...


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: vlamer on May 12, 2016, 09:04:05 PM
I think this will be confirmed after a few blocks ..
https://blockchain.info/tx/51b59008bdd688eefcfe29ac82ca8494f5ec7709a9c106ab72f54cbf1470cf58


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: achow101 on May 12, 2016, 09:12:11 PM
Hm... I have the feeling that I can't use the terminal well enough, it doesn't recognize the commande bitcoin-qt.
I can go in the right folder Applications where there is the .app file and open it, or use the command open, but I don't manage to execute it in another way...
Ok, so I haven't used a mac in a while so what I said was probably not right as that was for linux (which is similar to os x). A quick google search turns up this:
Code:
open Bitcoin-Qt.app --args -zapwallettxes
Try that and see if it works.


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: -Alex68- on May 13, 2016, 10:29:52 AM
I think this will be confirmed after a few blocks ..
https://blockchain.info/tx/51b59008bdd688eefcfe29ac82ca8494f5ec7709a9c106ab72f54cbf1470cf58

Wow, so something happened since blockchain.info found it yersterday, even if nothing is changed in Bitcoin Core.
What happened exactly ? It seems that
Code:
open Bitcoin-Qt --args zapwallettxes
has updated the transaction. However, it has submitted it without possibility of adding some fee. I may found myself in the same situation than previously, waiting for a long time.
Anyway, now it seems that I'm able to update the transaction. Hopefully, it will be accepted at one point. Thank you for this piece of code.

Thank you for your help. If anyone knows some details about the mechanism of transaction acceptance, and about "clients", I would be happy to get an insight into this.


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: ranochigo on May 13, 2016, 11:08:38 AM
I think this will be confirmed after a few blocks ..
https://blockchain.info/tx/51b59008bdd688eefcfe29ac82ca8494f5ec7709a9c106ab72f54cbf1470cf58

Wow, so something happened since blockchain.info found it yersterday, even if nothing is changed in Bitcoin Core.
What happened exactly ? It seems that
Code:
open Bitcoin-Qt --args zapwallettxes
has updated the transaction. However, it has submitted it without possibility of adding some fee. I may found myself in the same situation than previously, waiting for a long time.
Anyway, now it seems that I'm able to update the transaction. Hopefully, it will be accepted at one point. Thank you for this piece of code.

Thank you for your help. If anyone knows some details about the mechanism of transaction acceptance, and about "clients", I would be happy to get an insight into this.
What version of Bitcoin Core are you running? AFAIK, -zapwallettxes was only added in Bitcoin Core 0.9.0. If you have any version below that, doing so would just open the client again and it would rebroadcast the transaction since it was the default behavior.

If possible, you can easily rescript a new transaction and broadcast it.
I have structured the transaction below that is the same to your transaction except that it has a fee of 0.0001BTC. To sign it, go to Help>Debug window> Console. Next, type this
Code:
signrawtransaction 01000000038089459d3da4d66582976708f355cc01e4c0ab34a23171675398b8804038e23a000000001976a914c99905b5b8fe89534aa92a853c4f870705f44a3688acffffffffec00966da20b352049c37851ec5fead4972735c171c419a3f057268b9db29166010000001976a914c7755c1f717e7d2a58bf719f6bdf236a9da8dc0788acffffffff7a1c57e3068196c891f96fbc9f4b8e03d01000e7899689b3d4499c8e7104ef13000000001976a914fdd9410c089878ba9820b2b22296584a1df67d9488acffffffff017c220304000000001976a914a8b6401ea34d0f36bf768b9aa224bc4113a35f7a88ac00000000
  into the console, copy the output and use coinb.in/#broadcast to broadcast it. *Before you broadcast, please go to coinb.in/#verify and paste the signed TX to double check that the addresses matches.


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: vlamer on May 13, 2016, 11:53:56 AM
lucky it has been confirmed,


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: Alesia on June 23, 2016, 06:10:52 PM
Hi Guys,

I'm having the same problem (an unconfirmed transaction since 7 days) but cannot even open bitcoin-qt with the terminal on mac

"The file /Users/Charles 1/Bitcoin-Qt.app does not exist"

So how could I run the zapwallettxes ?


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: Alesia on June 23, 2016, 06:23:25 PM
Hi Guys,

I'm having the same problem (an unconfirmed transaction since 7 days) but cannot even open bitcoin-qt with the terminal on mac

"The file /Users/Charles 1/Bitcoin-Qt.app does not exist"

So how could I run the zapwallettxes ?

I did open /Applications/bitcoin-qt.app --args zapwallettxes which opens Bitcoin Core but nothing changes


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: achow101 on June 23, 2016, 06:42:24 PM
Hi Guys,

I'm having the same problem (an unconfirmed transaction since 7 days) but cannot even open bitcoin-qt with the terminal on mac

"The file /Users/Charles 1/Bitcoin-Qt.app does not exist"

So how could I run the zapwallettxes ?

I did open /Applications/bitcoin-qt.app --args zapwallettxes which opens Bitcoin Core but nothing changes
First of all, do not hijack someone else's thread. You have your own issue, make your own thread next time.

Secondly, you don't have to use zapwallettxes anymore. Instead, open up bitcoin core and go to Help  > Debug Window and click on the console tab. Then in the box at the bottom, type
Code:
 abandontransaction <txid>
Where <txid> is the transaction ID of the transaction you want to double spend.


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: Alesia on June 23, 2016, 07:36:01 PM
Hi Guys,

I'm having the same problem (an unconfirmed transaction since 7 days) but cannot even open bitcoin-qt with the terminal on mac

"The file /Users/Charles 1/Bitcoin-Qt.app does not exist"

So how could I run the zapwallettxes ?

I did open /Applications/bitcoin-qt.app --args zapwallettxes which opens Bitcoin Core but nothing changes
First of all, do not hijack someone else's thread. You have your own issue, make your own thread next time.

Secondly, you don't have to use zapwallettxes anymore. Instead, open up bitcoin core and go to Help  > Debug Window and click on the console tab. Then in the box at the bottom, type
Code:
 abandontransaction <txid>
Where <txid> is the transaction ID of the transaction you want to double spend.

I didn't want to hijack I just thought it would be easier since it's the same problem.

Anyway thanks for your time and reply I did : abandontransaction 1d150ad498c23524dcb60198d41676f3b44060fc37ac2d7e76f8625be4e5562c-000

But I had : Transaction not eligible for abandonment (code -5)


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: achow101 on June 23, 2016, 07:49:23 PM
I didn't want to hijack I just thought it would be easier since it's the same problem.

Anyway thanks for your time and reply I did : abandontransaction 1d150ad498c23524dcb60198d41676f3b44060fc37ac2d7e76f8625be4e5562c-000

But I had : Transaction not eligible for abandonment (code -5)
Remove the -000 part, it isn't actually part of the transaction ID.


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: Alesia on June 23, 2016, 07:53:22 PM
I didn't want to hijack I just thought it would be easier since it's the same problem.

Anyway thanks for your time and reply I did : abandontransaction 1d150ad498c23524dcb60198d41676f3b44060fc37ac2d7e76f8625be4e5562c-000

But I had : Transaction not eligible for abandonment (code -5)
Remove the -000 part, it isn't actually part of the transaction ID.

Unfortunately same thing and what is weird is that when I did the transaction on the 16th it went on blockchain until this morning (but was unconfirmed the whole time). It disappeared and now it's back with the same ID and the 2 good wallets' adresses, only difference the time which is now 23rd at 6pm.


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: Alesia on June 24, 2016, 07:05:59 AM
Any idea ?


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: merelcoin on June 24, 2016, 09:57:02 AM
Any idea ?

Your wallet probably rebroadcasted the transaction, since you were unable to abandon it...
IMHO, you have a couple options:
  • fix the issue you have with zapwallettxes (like knightdk said)
  • fix the issue you have with abandontransaction (like knightdk said)
  • wait untill it's confirmed
  • create a double-spend/RBF

The first 2 options are already explained, the third is pretty obvious, the last one shouldn't be to hard, since your tx has 1 input, 1 output and you're using core (so you can easily create raw transactions, sign them, broadcast them)


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: Alesia on June 24, 2016, 10:15:32 AM
Thanks Merelcoin :

- fix the issue you have with zapwallettxes (like knightdk said)
I opened the terminal and did : open /Applications/bitcoin-qt.app --args zapwallettxes
It opened but nothing changed

- fix the issue you have with abandontransaction (like knightdk said) :
I did abandontransaction 1d150ad498c23524dcb60198d41676f3b44060fc37ac2d7e76f8625be4e5562c
But Transaction not eligible for abandonment (code -5) came

- create a double-spend/RBF
I can't since my balance is at 0


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: merelcoin on June 24, 2016, 11:10:28 AM
Thanks Merelcoin :

- fix the issue you have with zapwallettxes (like knightdk said)
I opened the terminal and did : open /Applications/bitcoin-qt.app --args zapwallettxes
It opened but nothing changed

- fix the issue you have with abandontransaction (like knightdk said) :
I did abandontransaction 1d150ad498c23524dcb60198d41676f3b44060fc37ac2d7e76f8625be4e5562c
But Transaction not eligible for abandonment (code -5) came

- create a double-spend/RBF
I can't since my balance is at 0

To be honest, i have no mac to test out the command line arguments. I'm just going on what knightdk said, so it's basically up to you to get it working.
The last option tough, creating a double spend means you re-use the inputs used to create transaction 1d150ad498c23524dcb60198d41676f3b44060fc37ac2d7e76f8625be4e5562c . This means you can create a double spend, even if your wallet shows you have no more inputs to spend, as long as the transaction in which your inputs were used isn't confirmed, you can create a double spend.

In short:
* open your bitcoin-qt, go to the console, use createrawtransaction to generate a raw transaction. Make sure you leave a fee this time!!!
* copy the raw, unsigned transaction, sign it with signrawtransaction
* check the signed transaction with decoderawtransaction or online with tools like this: https://blockchain.info/decode-tx
* broadcast the signed transaction with sendrawtransaction or online tools like https://blockchain.info/pushtx

I can even do the first step for you... I'll update this post in a minute
Here is an unsigned transaction:
Code:
010000000171d708d452d6644f7cda462d5e27f891f0e1f365db85df77d147ead39b114f4b030000001976a9145f73795739fa9f424a293ffb436c83e5afe1402588acffffffff01828deb01000000001976a914a9342f9303c899dfd73ac42095d493fa5431315488ac00000000
Please note that the output is less than your initial transaction since i did add a 0.00015BTC fee, which should be sufficient for a 192 bytes transaction with a current fee of 60 bytes/satoshi


Now:
  • verify my unsigned transaction, either in bitcoin core or in https://blockchain.info/decode-tx
  • if you're OK with what i did, sign the transaction in your wallet (debugwindow => signrawtransaction 010...8ac00000000)
  • verify the signed transaction, either in bitcoin core or in https://blockchain.info/decode-tx
  • broadcast with bitcoin core or https://blockchain.info/pushtx

Now, you should have double-spent the inputs, "cancelling" out your original transaction

****Disclaimer****: if i generate transactions for you, it's up to you to doublecheck and verify everything... If you're unsure, ask a second opinion. I'm not liable if i made an error or typo when generating the unsigned transaction

Don't forget: there is always the option of just waiting untill the transaction gets confirmed, or even searching a pool operator on this forum and pay him some satoshi's in order to include your transaction in the next block he/she mines... This is by far the easyest way of solving the problem, and it might be the "cleanest" to


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: Alesia on June 24, 2016, 04:14:55 PM
Thanks a lot for you help !

So I did check the transaction and when I do sign the transaction that comes :

Error: Error parsing JSON:010000000171d708d452d6644f7cda462d5e27f891f0e1f365db85df77d147ead39b114f4b03000 0001976a9145f73795739fa9f424a293ffb436c83e5afe1402588acffffffff01828deb01000000 001976a914a9342f9303c899dfd73ac42095d493fa5431315488ac00000000

I'll try to find a miner on the forum.



Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: achow101 on June 24, 2016, 04:16:55 PM
Thanks a lot for you help !

So I did check the transaction and when I do sign the transaction that comes :

Error: Error parsing JSON:010000000171d708d452d6644f7cda462d5e27f891f0e1f365db85df77d147ead39b114f4b03000 0001976a9145f73795739fa9f424a293ffb436c83e5afe1402588acffffffff01828deb01000000 001976a914a9342f9303c899dfd73ac42095d493fa5431315488ac00000000

I'll try to find a miner on the forum.


What was the command that you did?


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: Alesia on June 24, 2016, 04:26:36 PM
1) I did : signrawtransaction 010000000171d708d452d6644f7cda462d5e27f891f0e1f365db85df77d147ead39b114f4b03000 0001976a9145f73795739fa9f424a293ffb436c83e5afe1402588acffffffff01828deb01000000 001976a914a9342f9303c899dfd73ac42095d493fa5431315488ac00000000

But said that I need to put my walletpassword first so I did :

2) signrawtransaction (mywalletpassword) 010000000171d708d452d6644f7cda462d5e27f891f0e1f365db85df77d147ead39b114f4b03000 0001976a9145f73795739fa9f424a293ffb436c83e5afe1402588acffffffff01828deb01000000 001976a914a9342f9303c899dfd73ac42095d493fa5431315488ac00000000

I did try (mywalletpassword) sigrawtransaction ... but an other error came


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: achow101 on June 24, 2016, 04:29:36 PM
What you need to do are actually 2 commands.

The first is to unlock your wallet with
Code:
walletpassphrase <passphrase> 120
where <passphrase> is your passphrase. The 120 indicates how long your wallet will remain unlocked, in this case 120 seconds (2 minutes). You have 2 minutes to do the next command.

Code:
signrawtransaction 010000000171d708d452d6644f7cda462d5e27f891f0e1f365db85df77d147ead39b114f4b03000 0001976a9145f73795739fa9f424a293ffb436c83e5afe1402588acffffffff01828deb01000000001976a914a9342f9303c899dfd73ac42095d493fa5431315488ac00000000
This will sign the transaction.


Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: Alesia on June 24, 2016, 04:41:14 PM
Thanks a lot Knightdk & Merelcoin especially for your patience : I did succeed by using zapwallettxes

The right command on mac is : open /Applications/bitcoin-qt.app --args -zapwallettxes



Title: Re: Never confirmed transaction, how to get it back in the wallet ?
Post by: Alesia on June 24, 2016, 06:17:22 PM
So now I double spent it with fees hope it will go through.