How to reparse counterblock database?

The procedure is very similar to counterparty database reparse.

Example for counterblock mainnet on Federated Node is given below. For testnet modify the name of counterblock command(s) and specify the right the configuration file.

$ sudo sv stop counterblock[-testnet]
$ sudo su -s /bin/bash -c 'counterblock --config-file /home/xcp/.config/counterblock/server.[testnet.]conf -v --reparse' xcpd
$ sudo sv start counterblock[-testnet]

This can take a long time (30+ mins just for testnet), but with counterblock you can actually stop the reparse with CTRL+C after couple of mins and start counterblock service.

Reparse will continue in the background.