TransWikia.com

Private Network on restart balance and transaction is gone?

Ethereum Asked by Harpreet Singh on November 27, 2021

I am running a private ethereum node with a single node.
and it creates a folder for the keystore and chaindata But on restart, all the data is gone even the balance as well.

init genesis.json is occurred only once and later only this:

geth –gcmode archive –port 3000 –networkid 15 –nodiscover –datadir=./block-data –maxpeers=2 –rpc –rpcaddr 0.0.0.0 –rpcport 8545 –rpccorsdomain “*” –rpcapi “eth,net,web3,personal,miner” –allow-insecure-unlock

One Answer

Well, I got the solution, when you run the network its saves keychain and nodedata on --datadir. To make the data available while restarting the network 2 points are important :

  1. Don't init again which is geth init genesis.json, it will reset.
  2. Use geth import {DIR} , directory used in --datadir.

Answered by Harpreet Singh on November 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP