0

Does private network persist ether, accounts and contracts when they are closed?

I have started a private network with following command

geth --datadir=./chaindata --networkid 15 --ipcpath /Users/{user-name}/Library/Ethereum/geth.ipc

I have created and account and mine some ether.

Afterwards, I have stopped the private network and when I have restarted it. Everythings was gone. Is it normal? Is there a way to persist private network even it is stopped.

p.s. I have stopped private network with "kntrl + c". Maybe There is another way for graceful stop.

2

Yes. All the data is inside ./chaindata. When you restart the node with the same command line parameters you will start with the state before it was closed.

If you execute the console command of geth you can type exit at the prompt and it will shutdown the running instance.

0

I have found the problem. I have started geth from home directory and eventhough there is no chaindata folder exists there, it started somehow. But there were no account or ether. Also, I could not mine there. When I realized I have gone the folder where chaindata exists and run the command again. It started with all created accounts and ethers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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