You copied the entire chainstate too, which will confuse the node and cause it to be unable to continue syncing because the chainstate says the Bitcoin Cash chain is invalid and the node things that the chain it is currently using is also invalid. You can fix this by removing the chainstate, in which case it will begin reindexing.
However this may not fix all of your problems because the Bitcoin chain is still on disk and it will still index and verify that. So you may need to delete some of the blk*.dat and rev*.dat files (the higher numbered ones) in order to get it to revert to a state before the fork and then sync Bitcoin Cash from that point onwards.
Details are that we copy the .bitcoin
directory, but remove the .bitcoin/chainstate
directory. If you run the client now, it will freeze again when it gets to the blk*.dat
files that are beyond the fork. By running it while also running:
watch -n 1 'sudo lsof -c bitcoin | egrep -o "bitcoin/blocks/(blk|rev).*dat" | uniq | sed -E "s/^.+$/& `date`/" | tee -a recent.blk'
and
watch tail recent.blk
,
I was able find that the files that need to be deleted are .bitcoin/blocks/{blk,rev}00953.dat
and above. That is, keep 00000 to 00952. Then when I ran the client again, it worked. After the fork, it synced with the network. You can save yourself running it twice by just going ahead and deleting both the chainstate/ directory and the relevant files in blocks/. When you run the client, it will say, "Error loading the block database, do you want to rebuild now?" Respond, "Yes", and then it will say "Reindexing the blocks on disk", followed by "Syncing the Headers (478436)". That last number is the number of blocks in blk00000.dat
through blk00952.dat
, and just preceeds the fork at 478558.