How Does a ‘Fork’ in the Blockchain Affect the Transactions Held in a Node’s Mempool?
A fork occurs when two or more valid blocks are mined at nearly the same time, creating a temporary split in the chain. When a fork happens, transactions from the block on the shorter, orphaned chain are typically returned to the Mempool.
Nodes will then wait for one chain to become dominant (the longest chain rule in PoW). Once the dominant chain is established, miners re-include the returned transactions into new blocks on that chain.