<p>When a block is disconnected, its transactions are added back to the mempool (where possible). If the new branch connected afterwards does not remove them again, they remain there, and will be picked up by the block construction code.</p>

CC BY-SA 4.0
2019-05-27T20:52:19.767Z
This is unrelated to the undo files though; those are only for reconstructing the UTXO set. The mempool always contains full transactions.
Pieter Wuille
CC BY-SA 4.0
2019-05-27T23:10:25.840Z
Let me update the title, it may be more useful for future travellers
sr_gi
CC BY-SA 4.0
2019-05-27T20:40:04.573Z
2019-05-27T20:40:04.573Z
Pieter Wuille
<p>After reading <a href="https://bitcoin.stackexchange.com/questions/87991/how-bitcoin-nodes-update-utxo-set-when-their-latests-blocks-are-replaced">this answer by Pieter about &quot;undo files&quot;</a> I'm wondering what happens with transactions that were included in stale blocks but are left out the new blocks when &quot;rolling back&quot;. Are they just dropped or do nodes include them in mempool and re-forward them?</p>

<blockchain-fork><stale-block>
Bitcoin Core mempool after disconnecting a block
sr_gi
# Bitcoin Core mempool after disconnecting a block

(Asked by: username_0 on 2019-05-27)

After reading [this answer by username_1 about "undo files"](https://bitcoin.stackexchange.com/questions/87991/how-bitcoin-nodes-update-utxo-set-when-their-latests-blocks-are-replaced) I'm wondering what happens with transactions that were included in stale blocks but are left out the new blocks when "rolling back". Are they just dropped or do nodes include them in mempool and re-forward them?

**Tags:** blockchain-fork, stale-block


---

## 1 answers

### Answer by username_1 on 2019-05-27. Score: 4 | Accepted answer

When a block is disconnected, its transactions are added back to the mempool (where possible). If the new branch connected afterwards does not remove them again, they remain there, and will be picked up by the block construction code.

> **Comments:**
> **username_1**: This is unrelated to the undo files though; those are only for reconstructing the UTXO set. The mempool always contains full transactions.  
> **username_0**: Let me update the title, it may be more useful for future travellers  

---

