Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: thinkloop on December 20, 2013, 10:08:35 PM



Title: How do transactions in orphaned blocks get back into the pool?
Post by: thinkloop on December 20, 2013, 10:08:35 PM
What happens if two miners solve a block at about the same time, with different transactions in them, and one of the blocks gets rejected - aka becomes orphaned? How do transactions in the orphaned block get back into the pool of transactions to be mined and confirmed again?


Title: Re: How do transactions in orphaned blocks get back into the pool?
Post by: thinkloop on December 24, 2013, 11:58:19 PM
Nothing?


Title: Re: How do transactions in orphaned blocks get back into the pool?
Post by: DeathAndTaxes on December 25, 2013, 12:13:48 AM
It is Christmas eve dude ...

still if it can't wait.   When nodes learn of a new block that orphans an existing block they add any tx from the orphaned block back to the memory pool when orphaning it.  Likewise nodes remove txs from the memory pool when they receive a block which extends the longest chain.   It is possible the tx is in both blocks and thus is added and removed from the memory pool as part of the reorg.

Orphaned tx can't be "lost" unless there is a double spend.


Title: Re: How do transactions in orphaned blocks get back into the pool?
Post by: thinkloop on January 04, 2014, 12:36:07 AM
lol, you're right. Thanks for your explanation, makes a lot of sense!