Bitcoin Forum
December 11, 2016, 10:17:19 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: What if you spend after receiving a double spend?  (Read 1059 times)
Hal
VIP
Sr. Member
*
expert
Offline Offline

Activity: 314



View Profile
January 28, 2011, 09:41:15 PM
 #1

Suppose you receive a payment and then immediately spend it. Then there is a block reorganization and the payment to you goes away. It never comes back because it was a double spend. Can the client handle this? How would it appear in the transaction window?

Hal Finney
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481451439
Hero Member
*
Offline Offline

Posts: 1481451439

View Profile Personal Message (Offline)

Ignore
1481451439
Reply with quote  #2

1481451439
Report to moderator
1481451439
Hero Member
*
Offline Offline

Posts: 1481451439

View Profile Personal Message (Offline)

Ignore
1481451439
Reply with quote  #2

1481451439
Report to moderator
1481451439
Hero Member
*
Offline Offline

Posts: 1481451439

View Profile Personal Message (Offline)

Ignore
1481451439
Reply with quote  #2

1481451439
Report to moderator
caveden
Legendary
*
Offline Offline

Activity: 1106



View Profile
January 29, 2011, 11:58:54 AM
 #2

What's interesting is to ask what happens if in the inputs you have addresses that are "fine" and others which have their balance dependent on the double-spend. What happens to this transactions after the block reorganization?

18rZYyWcafwD86xvLrfuxWG5xEMMWUtVkL
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526


View Profile
January 29, 2011, 12:30:22 PM
 #3

I think the transactions in question will go back to showing as zero confirmations.
Cdecker
Hero Member
*****
Offline Offline

Activity: 487



View Profile WWW
January 30, 2011, 11:41:27 AM
 #4

I think the transactions in question will go back to showing as zero confirmations.
Exactly, it'll return to 0 and never confirm Cheesy
Btw: all transactions could be invalidated, it's just incredibly unlikely, because someone would have to fork the chain before the transaction and overtake the current chain.

Want to see what developers are chatting about? http://bitcoinstats.com/irc/bitcoin-dev/logs/
Bitcoin-OTC Rating
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 2506


View Profile
January 30, 2011, 12:15:18 PM
 #5

What's interesting is to ask what happens if in the inputs you have addresses that are "fine" and others which have their balance dependent on the double-spend.

The good inputs will end up getting stuck. There was an "outbreak" of a similar issue a while ago when Bitcoin sent 0-confirmation coins that would never confirm, permanently tying up all of the other coins in that transaction. Bitcoin now never sends 0-confirmation coins and prefers to send fully-confirmed coins, so this sort of thing should be less likely.

ReacceptWalletTransactions() already re-checks your transactions on Bitcoin startup, but it doesn't seem to remove the transactions if they've become invalid. Maybe it should do so for sent transactions.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
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!