From 65a26e40a886c48031a7936d3cc9bf341e7165f4 Mon Sep 17 00:00:00 2001 From: zelig Date: Wed, 17 Jun 2015 11:25:42 +0100 Subject: [PATCH] require explicit etherbase address for mining. Falling back to primary is risky given it is inconsistent if keys are imported/merged/created or copied/transfered --- eth/backend.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/eth/backend.go b/eth/backend.go index ce774ba1bc..8195110de8 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -464,10 +464,9 @@ func (s *Ethereum) StartMining(threads int) error { func (s *Ethereum) Etherbase() (eb common.Address, err error) { eb = s.etherbase if (eb == common.Address{}) { - err = fmt.Errorf("no accounts found") - return eb, err + err = fmt.Errorf("etherbase address must be explicitly specified") } - return eb, nil + return } func (s *Ethereum) StopMining() { s.miner.Stop() }