0

I started the geth console with geth.exe attach http://IP:8545 and tried to set the etherbase with miner.setEtherbase(eth.accounts[0]) and then start the miner with miner.start(). I got the exception:

ReferenceError: 'miner' is not defined

Right now I only have this modules: Geth console modules

How can I add the miner module to to my standard connection command shown above?

Nightscape
  • 103
  • 3

1 Answers1

0

Before starting mining you must need to set etherbase or coinbase. To set etherbase / coinbase use the follwing command -

miner.setEtherbase(eth.accounts[0])

If you don't set an etherbase address then you can not start mining.

Refer the following question to understand What is coinbase?

Refer the following documentation for more details -

https://github.com/ethereum/go-ethereum/wiki/Mining

Hope it helps!

Soham Lawar
  • 2,567
  • 14
  • 38
  • 1
    I set the etherbase but i forgot to mention it in the question. My question is more on how can I add the miner module in the geth javscript console with my standard connection command: geth attach ip:8545? – Nightscape Sep 24 '18 at 07:57