Bitcoin Forum
December 11, 2016, 12:03:09 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: [GUIDE] Cancel your 0/unconfirmed transactions  (Read 5764 times)
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
July 24, 2011, 09:27:16 PM
 #1

This is far less efficient than using the new pywallet, see here: https://bitcointalk.org/index.php?topic=35214.0

Hi all
While playing with the bitcoin client, I made some 0/unconfirmed transactions (no confirmation for 2 days)
I didn't find anything simple to recover the bitcoins lost

When I finally found a method to cancel those transactions I made a python script to make that simple

So, are those unconfirmed transactions still a problem?
If so I'll write here how to cancel them


Here it is:
0. I'm assuming that your wallets are in Bitcoin default directory, if not, use -w and -n options at step 6
1. Backup your broken wallet.dat
2. Rename it wallet.old
3. Find the wallet into which you want to add the old adresses (you can run bitcoin to create a brand new one) and rename it  wallet.new
4. Download my pywallet fork: https://github.com/jackjack-jj/pywallet and write down the directory you put it
5. Download my walletco: https://github.com/jackjack-jj/walletco
6. Assuming both wallet.new and wallet.old are in bitcoin default directory(if not, look at walletco options), run this: /path/to/walletco.py -p /pywallet/directory/ -W wallet.old -N wallet.new
7. Rename wallet.new to wallet.dat (or use my bitcoin fork to chose the walletfile)

In the next release, walletco will auto backup both wallets

Feel free to make pull requests and tell me if it fixed your wallet

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
1481457789
Hero Member
*
Offline Offline

Posts: 1481457789

View Profile Personal Message (Offline)

Ignore
1481457789
Reply with quote  #2

1481457789
Report to moderator
If you see garbage posts (off-topic, trolling, spam, no point, etc.), use the "report to moderator" links. All reports are investigated, though you will rarely be contacted about your reports.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481457789
Hero Member
*
Offline Offline

Posts: 1481457789

View Profile Personal Message (Offline)

Ignore
1481457789
Reply with quote  #2

1481457789
Report to moderator
1481457789
Hero Member
*
Offline Offline

Posts: 1481457789

View Profile Personal Message (Offline)

Ignore
1481457789
Reply with quote  #2

1481457789
Report to moderator
kookiekrak
Full Member
***
Offline Offline

Activity: 238


View Profile
July 24, 2011, 09:59:28 PM
 #2

was a problem for me. i had to use berkeleydb tools to remove those transactions

FREE 100 GME if you post your Cryptsy TradeKey on the official GameCoinTalk forums

http://www.gamecointalk.org/index.php?topic=7.msg9#new
sequence
Jr. Member
*
Offline Offline

Activity: 58


View Profile
July 24, 2011, 11:34:34 PM
 #3

Yes I have one unconfirmed but I believe its because my block chain won't download even with two connections
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
July 25, 2011, 12:32:14 AM
 #4

Check how many blocks your client downloaded
If it's 137873, your transaction should have some confirmations

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
BrianH
Full Member
***
Offline Offline

Activity: 135


View Profile
July 25, 2011, 04:26:26 AM
 #5

Yes. How do you cancel them?
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
July 25, 2011, 10:19:54 AM
 #6

First post edited

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
BrianH
Full Member
***
Offline Offline

Activity: 135


View Profile
July 25, 2011, 09:32:22 PM
 #7

Thanks for your help on this. The transaction was removed from the wallet, but the funds did not change. Maybe there is something else wrong with my wallet?

I am on Win7 so I...
1. Backed up my broken wallet.dat
2. Renamed it wallet.old and left in Bitcoin directory
3. Created a new wallet.new in Bitcoin directory
4. Downloaded Python x64
5. Installed to C:\Python
6. Downloaded and extracted your pywallet fork to C:\Python
7. Downloaded and extracted walletco to C:\Python. (Check the link in OP.)
8. Opened a command window and ran this line "python walletco.py -p /python/ -W wallet.old -N wallet.new"

Shows "Importing: 100.00%"

jimbo77
Member
**
Offline Offline

Activity: 78


View Profile
July 25, 2011, 09:45:42 PM
 #8

If the transaction was broadcast it could go through at any time until you make a new transaction that spends it first?
BrianH
Full Member
***
Offline Offline

Activity: 135


View Profile
July 25, 2011, 09:55:38 PM
 #9

It must be something along those lines, because it looks like my debits/credits match.
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
July 25, 2011, 10:00:45 PM
 #10

Thanks for your help on this. The transaction was removed from the wallet, but the funds did not change. Maybe there is something else wrong with my wallet?

I am on Win7 so I...
1. Backed up my broken wallet.dat
2. Renamed it wallet.old and left in Bitcoin directory
3. Created a new wallet.new in Bitcoin directory
4. Downloaded Python x64
5. Installed to C:\Python
6. Downloaded and extracted your pywallet fork to C:\Python
7. Downloaded and extracted walletco to C:\Python. (Check the link in OP.)
8. Opened a command window and ran this line "python walletco.py -p /python/ -W wallet.old -N wallet.new"

Shows "Importing: 100.00%"
First, DO NOT write here the privkeys (starting in 5), be sure to remove them all if you paste here the code in the console

Before "Importing:100%", what was written?
If it was like that, your new wallet has all the old keys:

Code:
Address: 1AdDressxxxxx
Privkey: 5xxxxxxx
Imported successfully

If not, please paste a little sample (again, remove the privkeys)


If debits/credits match, you should perform a -rescan

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
July 25, 2011, 10:08:05 PM
 #11

If the transaction was broadcast it could go through at any time until you make a new transaction that spends it first?
Your sentence is too complicated for my poor english Grin
But if understand correctly, what you want to do is :
- make a transaction
- make your wallet forget it
- make a new transaction that spend the same funds than the first one
- hope the last one gets written in the blockchain before the first one

If you remove also your blockchain history, I believe it could work if the second transaction reachs a miner before the first

Are you thinking about the merchants who accept funds before being confirmed? Wink

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
jimbo77
Member
**
Offline Offline

Activity: 78


View Profile
July 25, 2011, 10:14:56 PM
 #12

If the transaction was broadcast it could go through at any time until you make a new transaction that spends it first?
Your sentence is too complicated for my poor english Grin
But if understand correctly, what you want to do is :
- make a transaction
- make your wallet forget it
- make a new transaction that spend the same funds than the first one
- hope the last one gets written in the blockchain before the first one

If you remove also your blockchain history, I believe it could work if the second transaction reachs a miner before the first

Are you thinking about the merchants who accept funds before being confirmed? Wink
Yup thanks.
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
July 26, 2011, 03:17:20 PM
 #13

It must be something along those lines, because it looks like my debits/credits match.
Please keep me updated, I'd like to know if it's useful

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
krepta3000
Member
**
Offline Offline

Activity: 92


View Profile
July 28, 2011, 10:09:01 PM
 #14

Hi all
While playing with the bitcoin client, I made some 0/unconfirmed transactions (no confirmation for 2 days)
I didn't find anything simple to recover the bitcoins lost

When I finally found a method to cancel those transactions I made a python script to make that simple

So, are those unconfirmed transactions still a problem?
If so I'll write here how to cancel them


Here it is:
0. I'm assuming that your wallets are in Bitcoin default directory, if not, use -w and -n options at step 6
1. Backup your broken wallet.dat
2. Rename it wallet.old
3. Find the wallet into which you want to add the old adresses (you can run bitcoin to create a brand new one) and rename it  wallet.new
4. Download my pywallet fork: https://github.com/jackjack-jj/pywallet and write down the directory you put it
5. Download my walletco: https://github.com/jackjack-jj/walletco
6. Assuming both wallet.new and wallet.old are in bitcoin default directory(if not, look at walletco options), run this: /path/to/walletco.py -p /pywallet/directory/ -W wallet.old -N wallet.new
7. Rename wallet.new to wallet.dat (or use my bitcoin fork to chose the walletfile)

In the next release, walletco will auto backup both wallets

Feel free to make pull requests and tell me if it fixed your wallet

I love you, in a platonic way, for doing this!  Awesome! Smiley
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!