bitcoinbitcoindbitcoin-testnet

How to reset blocks count in bitcoin-cli regtest?


How can I reset the block count value or fully restart the regtest?

Now getblockcount command returns me a 6120.

$ bitcoin-cli getblockcount
6120

After reloading bitcoind the getblockcount value not resets to 0


Solution

  • I had to just delete the regtest subdirectory inside the .bitcoin folder

    You can safely delete the regtest subdirectory and restart Bitcoin Core to start a new regtest

    https://developer.bitcoin.org/examples/testing.html