[Ethereum] Geth –dev mode; define reward account for mining

genesisgo-ethereumminingprivate-blockchaintestnets

If I set up a development testnet on geth and start mining, what account number gets the rewards?

What command can I use to define the mining account?

Console1:

geth --dev

Console2:

geth --dev attach
> miner.start()
true
>

In console 1 I get messages like:

I0930 11:14:56.732449 miner/worker.go:339] ??  Mined block (#10 / 4486bfb7). Wait 5 blocks for confirmation 

Should the ?? be an address? What command can I use to define the mining account?

Best Answer

Shut down geth using Control-C for instance #1 and Control-D for instance #2.

Then type geth account new to create a new account. Enter in a passphrase that you will need to remember if you want to unlock the account.

Then restart geth and you should see your first account (or coinbase) listed.

Related Topic