Bitcoin Forum
May 10, 2024, 11:37:12 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What if you spend after receiving a double spend?  (Read 1328 times)
Hal (OP)
VIP
Sr. Member
*
expert
Offline Offline

Activity: 314
Merit: 3853



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
1715341032
Hero Member
*
Offline Offline

Posts: 1715341032

View Profile Personal Message (Offline)

Ignore
1715341032
Reply with quote  #2

1715341032
Report to moderator
1715341032
Hero Member
*
Offline Offline

Posts: 1715341032

View Profile Personal Message (Offline)

Ignore
1715341032
Reply with quote  #2

1715341032
Report to moderator
1715341032
Hero Member
*
Offline Offline

Posts: 1715341032

View Profile Personal Message (Offline)

Ignore
1715341032
Reply with quote  #2

1715341032
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715341032
Hero Member
*
Offline Offline

Posts: 1715341032

View Profile Personal Message (Offline)

Ignore
1715341032
Reply with quote  #2

1715341032
Report to moderator
1715341032
Hero Member
*
Offline Offline

Posts: 1715341032

View Profile Personal Message (Offline)

Ignore
1715341032
Reply with quote  #2

1715341032
Report to moderator
1715341032
Hero Member
*
Offline Offline

Posts: 1715341032

View Profile Personal Message (Offline)

Ignore
1715341032
Reply with quote  #2

1715341032
Report to moderator
caveden
Legendary
*
Offline Offline

Activity: 1106
Merit: 1004



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?
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


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: 489
Merit: 504



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
*
Offline Offline

Activity: 5194
Merit: 12982


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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!