I am referring this tutorial and miner.start(1)
works fine and mining is started as expected like below.
INFO [09-05|15:41:26.486] Commit new mining work number=221 sealhash=1892af…f2ffcd uncles=0 txs=0 gas=0 fees=0 elapsed=243.187µs
INFO [09-05|15:41:26.706] Successfully sealed new block number=221 sealhash=1892af…f2ffcd hash=10497a…b00914 elapsed=219.629ms
INFO [09-05|15:41:26.706] 🔗 block reached canonical chain number=214 hash=b3cb32…9dbe53
INFO [09-05|15:41:26.706] 🔨 mined potential block number=221 hash=10497a…b00914
INFO [09-05|15:41:26.707] Commit new mining work number=222 sealhash=36083f…4c7697 uncles=0 txs=0 gas=0 fees=0 elapsed=202.361µs
INFO [09-05|15:41:32.083] Successfully sealed new block number=222 sealhash=36083f…4c7697 hash=18607b…9362b7 elapsed=5.376s
INFO [09-05|15:41:32.083] 🔗 block reached canonical chain number=215 hash=5ce9de…005985
INFO [09-05|15:41:32.083] 🔨 mined potential block number=222 hash=18607b…9362b7
INFO [09-05|15:41:32.084] Commit new mining work number=223 sealhash=90508f…09cb94 uncles=0 txs=0 gas=0 fees=0 elapsed=158.478µs
Now the author says to check balance after mining starts, so to do that i open a new geth window console says
Fatal: Error starting protocol stack: listen udp :30303: bind: address
already in use
which is obvious because of mining window which is running currently.
So my question is how can i check balance after starting miner?
Or should i wait for completion of mining?
If i should wait for mining completion then how much time it will take to complete?
Best Answer
So here i am posting an answer to my own post so that somebody else might get benefited.
Q1. how can i check balance after starting miner?
Ans. you can check the balance by running by attaching geth console but if you dont know where is the ipc file then use below command from your base directory to find the ipc file by this command.
this will locate the ipc file location so in my case it was
/home/blockchain/medium-article/datadir/geth.ipc
now attach geth console like below command.
Q2. Should i wait for completion of mining?
Ans. No,you don't have to wait for mining to complete. by following above process you can open geth console.
Q3. how much time it will take to complete?
Ans. Time varies from configuration to configuration.