0

I want to develop a dapp and deploy on geth. I have installed geth and mist wallet. Now, when I am starting miner.start(1) to make some ethers for account. It is showing me null and no ether is getting generated. I have geth running on 1 terminal window, Mist wallet opened and geth console running on 2nd terminal window. I am following a tutorial on youtube and in that miner.start(2) returns true and mining starts within no time. Please help how I can generate ether for my private network.

My genesis.json is

{
  "alloc": {
  "0x0000000000000000000000000000000000000001": {"balance": "111111111"},
  "0x0000000000000000000000000000000000000002": {"balance": "222222222"}
  },
  "config": {
        "chainId": 15,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0
    },
  "coinbase"   : "0x0000000000000000000000000000000000000000",
  "difficulty" : "0x20000",
  "extraData"  : "",
  "gasLimit"   : "0x2fefd8",
  "nonce"      : "0x0000000000000042",
  "mixhash"    : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp"  : "0x00"
}

Please help in how to solve miner.start() issue.

PrashantNagawade
  • 426
  • 1
  • 6
  • 24
UbuntuCoder
  • 101
  • 1
  • 2

1 Answers1

1

Even if it returns null, the mining actually starts. You should see activity in your geth output-console indicating mining has started. Even in the mist wallet you must have got many ethers (I got 995 ethers in just 3 to 4 minutes by doing miner.start(2).

To stop mining, type miner.stop().

PrashantNagawade
  • 426
  • 1
  • 6
  • 24
  • No, it is not. You can check if mining starts or not by calling `eth.hashrate`. If it's `0` mining haven't started. – Vadim Filin Feb 28 '18 at 09:27
  • @VadimFilin u start getting the ethers in your MEW as well as your geth output-console shows mining also, that means mining has been started! – PrashantNagawade Feb 28 '18 at 15:19