Bitcoin Core mempool after disconnecting a block After reading this answer by Pieter about "undo files" I'm wondering what happens with transactions that were included in orphaned 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?
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.