0

i'm taking a course.

in this course we create a private network and create some ether(miner.start(1))

i check my account and i have some ether.

eth.getBalance(eth.accounts[0]) => 12

i practice some transactions between accounts. we also practice making a simple contract and deploying it.

everything is fine.

a couple of days later i open geth console i check the balance and everything intact.

a couple of minutes later, without me doing anything, i see:

INFO [09-07|00:03:18] Block synchronisation started 
WARN [09-07|00:03:23] Chain split detected                     number=1343 hash=83c5c1…1d6816 drop=161 dropfrom=dd2711…3610a4 add=129 addfrom=cae0a0…2f1d63
INFO [09-07|00:03:24] Imported new chain segment               blocks=177 txs=1 mgas=0.125 elapsed=3.276s mgasps=0.038 number=1520 hash=a361ad…f9eb65
INFO [09-07|00:03:28] Imported new chain segment               blocks=768 txs=0 mgas=0.000 elapsed=4.388s mgasps=0.000 number=2288 hash=b604e9…3f3143
INFO [09-07|00:03:36] Imported new chain segment               blocks=1435 txs=17 mgas=0.887 elapsed=8.004s mgasps=0.111 number=3723 hash=fa8f1d…b0f9c7
INFO [09-07|00:03:39] Imported new chain segment               blocks=485  txs=11 mgas=0.234 elapsed=2.632s mgasps=0.089 number=4208 hash=e61a89…7b02df
INFO [09-07|00:03:45] Imported new chain segment               blocks=1112 txs=13 mgas=0.731 elapsed=6.064s mgasps=0.120 number=5320 hash=14afe6…ffbab4
INFO [09-07|00:15:13] Imported new chain segment               blocks=1    txs=0  mgas=0.000 elapsed=7.481ms mgasps=0.000 number=5321 hash=d933c2…0b1f03
INFO [09-07|00:15:13] Imported new chain segment               blocks=1    txs=0  mgas=0.000 elapsed=10.734ms mgasps=0.000 number=5322 hash=2d4437…84ab97

check the account balance and it's 0.

maybe i haven't waited till the synchronization has actually finished?

can someone explain to me what is going on? and how can i fix it so i won't have to start over with the private network?

  • Your node is connected to another node with the same genesis file. You can have your own network if you genesis is differente, for example a different network id. Or you can disable connectivity with --nodiscover --nat none --maxpeers 0. – Ismael Sep 7 '17 at 17:34
1

geth console would synchronize ethereum main net, so current situation isn't private network. You can execute the command below:

geth --datadir=~/Downloads/dev console

~/Downloads/dev directory is datadir of saving all data.

Hope it helps~

  • when i start geth i use ./bin/geth --datadir=./datadir console command – tryko Sep 7 '17 at 4:48
  • Yes, you are right~ – BinGoBinBin Sep 7 '17 at 4:52

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.