I have Bitcoin Core's
bitcoind running and synced in a VM. Now I want to clone the VM and run one of the various hard forks (such as Bitcoin Cash) in the clone. The plan is to roll back my copy of the blockchain database in the clone to the last block shared by the two chains (e.g. block number 478558) and then start the fork's
bitcoind to sync the rest.
But I can't find the Bitcoin Core equivalent to Monero's
--pop-blocks n, which deletes the last
n blocks. Any ideas?
(I'd really like to avoid reimporting or even just reindexing the full blockchain, because my computer is quite slow and it will also waste lots of space compared to a CoW snapshot sharing most of the data between the two VMs.)