Restart altcoin blockchain


So, I'm setting up an altcoin for educational purposes and I've essentially forked Litecoin.

It's got a 10% premine on it but this wasn't showing up in my wallet so I deleted the $HOME/.mycoin/ directories on my nodes and my %appdata%/mycoin folder on my wallet host in an attempt to restart the blockchain.

However, the blocks that I have attempted to delete are still reappearing as soon as I start my daemon up again.

Any idea what directories/files I need to delete to completely restart the blockchain. This ought to be fairly trivial as I have complete control of the two nodes and the only machine that's connected to it.



Posted 2018-04-22T19:09:25.957

Reputation: 127



You need to delete the data directories entirely with the node software shut down when you do that. If both nodes' data directories have been removed and starting one of them still results in the blockchain being downloaded, that means that there is a node that you are connecting to which did not have its data directory cleared. You can find out what node that is by looking in the debug.log file and seeing the IP address of the node that you are connecting to (or is connecting to you).

Alternatively if you generate a new genesis block, you will not have this problem as whatever blockchain you use with the new genesis block will be different from the original blockchain.

Andrew Chow

Posted 2018-04-22T19:09:25.957

Reputation: 50 267

Yeah... believe it or not, someone had spied my release on github and had already mined my first block. how they did that I have no idea given I haven't advertised it anywhere – Persistence – 2018-04-23T12:02:52.460