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?

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!

|improve this answer|||||
  • 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 7:57

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.