4

I've installed ethereum go and started synching it with the main net. I would like to develop something so it's best to try first on a test net. If I launch geth with --testnet option does it already organises itself so that if later on I launch it on the main net it doesn't conflict? Should there be two different installations of geth for this purpose? What's the best practice?

Thanks!

1
  • I am doing it with private nets
    – Nulik
    Commented Oct 16, 2017 at 22:37

2 Answers 2

4

The files on disk are stored in different directories, so they won't conflict.

However, by default both will want to use the same network ports, so if you want to run both instances simultaneously (as opposed to stopping one then starting the other) then you'll need to set one of your geth instances to use non-standard ports. If you haven't done this correctly, the second instance will refuse to start because it can't bind to one of the ports it expects to use.

See this page for more detail: https://theethereum.wiki/w/index.php/Network_Ports,_Files_And_Directories

2

It used to work like that, you can switch from mainnet to testnet because each stores the blockchain data in a separate directory. Just make sure to exit any instance of geth before switching. You can always specify a different directory with --datadir option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.