Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Kouye on June 09, 2013, 02:34:45 AM



Title: [Solved] Cancel a QT transaction sent while offline before going back online
Post by: Kouye on June 09, 2013, 02:34:45 AM
My fiber provider has been having issues lately, so I'm temporarily using a wi-fi hotspot to connect.
Problem is, this hotspot does not allow peer-to-peer.
Second problem is I sent a payment before realizing it, using Bitcoin-QT, which has not been processed yet, since my main connection is still down.
And of course, the thing I payed for is long gone.

I have a pending "offline" payment which I want to cancel, since the seller didn't receive any confirmation, obviously, and dealed with someone else.

If I restore a wallet backup prior to this payment, is it going to be cancelled?
Is there any other way I can cancel it?

Cheers.

EDIT : changed title.


Title: Re: Sending coins while offline
Post by: Abdussamad on June 09, 2013, 05:12:19 PM
Post the transaction hash. If the payment has been confirmed you can't get the coins back. If not you can try a double spend.


Title: Re: Sending coins while offline
Post by: Kouye on June 09, 2013, 06:45:31 PM
It has not been confirmed for sure, it not even made it to the network, the peer-to-peer ports are blocked.
It's been acknowledged by the bitcoin-qt client, but is greyed out, with 0 confirmation.

Not really willing to try to double-spend it, more to cancel it, to avoid having to ask the recipient for a refund once I get back online and the payment makes it to the network.


Title: Re: Sending coins while offline
Post by: Abdussamad on June 09, 2013, 06:49:13 PM
What happens when you restart bitcoin-qt? Does it continue to try to send the transaction? If it does then the question is where is transaction data stored? If it is stored in the wallet then you will extract all private keys using pywallet and then recreate it.


Title: Re: Sending coins while offline
Post by: grue on June 09, 2013, 07:02:14 PM
What happens when you restart bitcoin-qt? Does it continue to try to send the transaction? If it does then the question is where is transaction data stored? If it is stored in the wallet then you will extract all private keys using pywallet and then recreate it.
you're trying to help, yet you don't know how bitcoin works.

The satoshi client will attempt to rebroadcast unconfirmed transactions at random intervals (30 minute on average, AFAIK). You can "cancel" the transaction by using pywallet (https://bitcointalk.org/index.php?topic=34028.0) and deleting the transaction from your wallet. That way, your transaction will essentially be "canceled".


Title: Re: Sending coins while offline
Post by: Kouye on June 09, 2013, 07:34:01 PM
The satoshi client will attempt to rebroadcast unconfirmed transactions at random intervals (30 minute on average, AFAIK). You can "cancel" the transaction by using pywallet (https://bitcointalk.org/index.php?topic=34028.0) and deleting the transaction from your wallet. That way, your transaction will essentially be "canceled".

Thank you, I was able to delete the Tx from my wallet using pywallet, hopefully it will work whenever my cable connection gets revived.
I won't know for sure before next wednesday as I'm on a business trip until then, but I'll be sure to tip you if it actually worked!


Title: Re: Sending coins while offline
Post by: rimbit on June 10, 2013, 09:08:31 AM
What happens when you restart bitcoin-qt? Does it continue to try to send the transaction? If it does then the question is where is transaction data stored? If it is stored in the wallet then you will extract all private keys using pywallet and then recreate it.
you're trying to help, yet you don't know how bitcoin works.

The satoshi client will attempt to rebroadcast unconfirmed transactions at random intervals (30 minute on average, AFAIK). You can "cancel" the transaction by using pywallet (https://bitcointalk.org/index.php?topic=34028.0) and deleting the transaction from your wallet. That way, your transaction will essentially be "canceled".

Thanks.. Good info!


Title: Re: Sending coins while offline
Post by: Kouye on June 25, 2013, 11:18:24 AM
Been away for a while, getting back on this issue.

So I successfully deleted the TX using pywallet, while offline.
The transaction didn't make it to the network for sure:

Id : a3abcd702749b0361c951a8285a82fd77414a06edca2da8e68892c624e428e5b

It does not appear in the blockchain, even though my client has been running for 15 hours now.

Problem is, my QT balance is still wrong, and still takes into account this offline, then deleted transaction.
I tried redownloading the whole chain, then tried a reindex and a rescan to no avail.

So basically I have 0,25BTC that were eaten by QT client.

Last hope might be to figure out what address QT used to send the coins, dump the private key and reimport in on the blockchain wallet, but how can I get the address QT used ?
I have the full pywallet transaction dump, but I can't see any address in it.

Thanks for your time!




Title: Re: Sending coins while offline
Post by: Cyberdyne on June 25, 2013, 11:51:46 AM
Been away for a while, getting back on this issue.

So I successfully deleted the TX using pywallet, while offline.
The transaction didn't make it to the network for sure:

Id : a3abcd702749b0361c951a8285a82fd77414a06edca2da8e68892c624e428e5b

It does not appear in the blockchain, even though my client has been running for 15 hours now.

Problem is, my QT balance is still wrong, and still takes into account this offline, then deleted transaction.
I tried redownloading the whole chain, then tried a reindex and a rescan to no avail.

So basically I have 0,25BTC that were eaten by QT client.

Last hope might be to figure out what address QT used to send the coins, dump the private key and reimport in on the blockchain wallet, but how can I get the address QT used ?
I have the full pywallet transaction dump, but I can't see any address in it.

Thanks for your time!




Forget about a 'transaction dump'... do what Abdussamad says and dump all the KEYS from your wallet.

Then from this you can create a new wallet with all your private keys, which will be forced to rebuild any transaction info from scratch.

Of course, pywallet doesn't have any bulk import feature as far as I know, so this could take a lot of time.


Title: Re: Sending coins while offline
Post by: Kouye on June 25, 2013, 05:32:15 PM
Using pywallet, I was able to bulk export all my keys (I had over 200, so I wasn't going to do this manually for BTC 0.25)
Then I croped the Tx from the generated file, just in case (I know it is not necessary), and reimported the file content in a blockchain account.

Balance was right on blockchain after the import was successful, so I just sent all the coins to a new address on my QT wallet, and got it all back (apart from the Tx fees, but that's ok).

Now I guess I just need to delete all the private keys from the blockchain account, if I'm unconfortable with those being somewhere on the net.

I still think there should be an option in QT to recompute the balance of all addresses, and then recompute the total balance, without going through all this hassle.

Thanks to all who helped!
Abdussamad and Cyberdyne, PM me a BTC address where I can send a small tip!


Title: Re: [Solved] Cancel a QT transaction sent while offline before going back online
Post by: jackjack on June 25, 2013, 06:04:11 PM
Of course, pywallet doesn't have any bulk import feature as far as I know, so this could take a lot of time.
What do you mean "bulk import"?
Importing from a file full of private keys?


Problem is, my QT balance is still wrong, and still takes into account this offline, then deleted transaction.
I know your problem is now solved, but for future reference, did you try to "bitcoin-qt -rescan" ?


Title: Re: [Solved] Cancel a QT transaction sent while offline before going back online
Post by: Kouye on June 25, 2013, 06:18:29 PM
I know your problem is now solved, but for future reference, did you try to "bitcoin-qt -rescan" ?

I tried redownloading the whole chain, then tried a reindex and a rescan to no avail.

 ;)


Title: Re: [Solved] Cancel a QT transaction sent while offline before going back online
Post by: jackjack on June 25, 2013, 08:16:11 PM
I know your problem is now solved, but for future reference, did you try to "bitcoin-qt -rescan" ?

I tried redownloading the whole chain, then tried a reindex and a rescan to no avail.

 ;)

Wow... How can my brain ignore the line just after the one I quoted? That's scary


Title: Re: [Solved] Cancel a QT transaction sent while offline before going back online
Post by: DiamondCardz on June 25, 2013, 08:35:47 PM
I know your problem is now solved, but for future reference, did you try to "bitcoin-qt -rescan" ?

I tried redownloading the whole chain, then tried a reindex and a rescan to no avail.

 ;)

Wow... How can my brain ignore the line just after the one I quoted? That's scary
/me gasps

Very scary indeed. I think you might have some problems with inattentiveness, jackjack  ;)