<blockquote>
  <p>Will it be included in one of blocks E, F, G or another block?</p>
</blockquote>

<p>It's likely already included in one of those blocks. If not, it can be included in a block after that. </p>

<blockquote>
  <p>Do I need to resend it?</p>
</blockquote>

<p>Probably not. If block D or Tx4 was widely seen by the network, it should get into a block soon. (It might already be in blocks E, F, or G.)</p>

<blockquote>
  <p>If yes, can I spend the same inputs I did when creating Tx4?</p>
</blockquote>

<p>Yes. When doing a reorg, the Bitcoin client first rolls the chainstate back to the first common ancestor.</p>

<p>The standard Bitcoin client actually includes a database for the sole purpose of rolling the blockchain back. (It's called an undofile.)</p>

CC BY-SA 3.0
2015-01-08T17:17:10.027Z
Thanks Nick! How is it determined which block (E/F/G/other) Tx4 is likely to be included into? If Tx4 is not included in any of the "new" blocks, what is the number of blocks after that point at which we can safely assume that Tx4 will not be included in any of the future blocks?
Doug Peters
CC BY-SA 3.0
2015-01-08T17:21:23.080Z
@DougPeters `How is it determined which block (E/F/G/other) Tx4 is likely to be included into?` It's decided by the miner before they mine those blocks. Miners will include most transactions, provided that they are legal, pay fees, and the miner knows about them.
Nick ODell
CC BY-SA 3.0
2015-01-08T17:22:58.360Z
@DougPeters `what is the number of blocks after that point at which we can safely assume that Tx4 will not be included` Never. You could wait 10 years, put Tx4 into a block, and it would still be legal. However, if it's been 4 days, the transaction has *probably* been forgotten.
Nick ODell
CC BY-SA 3.0
2015-01-08T17:28:08.980Z
4 days is an arbitary number I assume?
Doug Peters
CC BY-SA 3.0
2015-01-08T17:32:37.693Z
@DougPeters Pretty much. [This answer](http://bitcoin.stackexchange.com/a/9737) explains it better than I can.
Nick ODell
CC BY-SA 3.0
2015-01-08T16:56:41.823Z
2016-07-22T18:54:28.470Z
2016-07-22T18:54:28.470Z
Nick ODell
<p>Let's assume I create and send a series of txs:</p>

<pre><code>|------block A--------|------block B----------|----block C-----|----block D-----|
|Tx1......Tx2.........|...Tx3.................|................|......Tx4.......|
</code></pre>

<p>but then a fork happens and a block reorganization takes place:</p>

<pre><code>|------block A--------|------block B----------|----block E-----|----block F-----|--block G--|
|Tx1......Tx2.........|...Tx3.................|......???.......|......???.......|.....???...|
</code></pre>

<p>Whatever happens to Tx4? Will it be included in one of blocks E, F, G or another block? Is it gone? Conflicted/invalidated? Do I need to resend it? If yes, can I spend the same inputs I did when creating Tx4?</p>

<blockchain-fork><chain-reorganization>
What happens to my outgoing txs in a block reorganization?
Doug Peters
# What happens to my outgoing txs in a block reorganization?

(Asked by: username_0 on 2015-01-08)

Let's assume I create and send a series of txs:

```
|------block A--------|------block B----------|----block C-----|----block D-----|
|Tx1......Tx2.........|...Tx3.................|................|......Tx4.......|

```

but then a fork happens and a block reorganization takes place:

```
|------block A--------|------block B----------|----block E-----|----block F-----|--block G--|
|Tx1......Tx2.........|...Tx3.................|......???.......|......???.......|.....???...|

```

Whatever happens to Tx4? Will it be included in one of blocks E, F, G or another block? Is it gone? Conflicted/invalidated? Do I need to resend it? If yes, can I spend the same inputs I did when creating Tx4?

**Tags:** blockchain-fork, chain-reorganization


---

## 1 answers

### Answer by username_1 on 2015-01-08. Score: 5 | Accepted answer

> Will it be included in one of blocks E, F, G or another block?

It's likely already included in one of those blocks. If not, it can be included in a block after that.

> Do I need to resend it?

Probably not. If block D or Tx4 was widely seen by the network, it should get into a block soon. (It might already be in blocks E, F, or G.)

> If yes, can I spend the same inputs I did when creating Tx4?

Yes. When doing a reorg, the Bitcoin client first rolls the chainstate back to the first common ancestor.

The standard Bitcoin client actually includes a database for the sole purpose of rolling the blockchain back. (It's called an undofile.)

> **Comments:**
> **username_0**: Thanks username_1! How is it determined which block (E/F/G/other) Tx4 is likely to be included into? If Tx4 is not included in any of the "new" blocks, what is the number of blocks after that point at which we can safely assume that Tx4 will not be included in any of the future blocks?  
> **username_1**: @username_0 `How is it determined which block (E/F/G/other) Tx4 is likely to be included into?` It's decided by the miner before they mine those blocks. Miners will include most transactions, provided that they are legal, pay fees, and the miner knows about them.  
> **username_1**: @username_0 `what is the number of blocks after that point at which we can safely assume that Tx4 will not be included` Never. You could wait 10 years, put Tx4 into a block, and it would still be legal. However, if it's been 4 days, the transaction has *probably* been forgotten.  
> **username_0**: 4 days is an arbitary number I assume?  
> **username_1**: @username_0 Pretty much. [This answer](http://bitcoin.stackexchange.com/a/9737) explains it better than I can.  

---

