diff options
Diffstat (limited to 'eth/backend.go')
-rw-r--r-- | eth/backend.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/eth/backend.go b/eth/backend.go index dc592e7fc..bed6231ed 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -489,7 +489,11 @@ 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("etherbase address must be explicitly specified") + addr, e := s.AccountManager().AddressByIndex(0) + if e != nil { + err = fmt.Errorf("etherbase address must be explicitly specified") + } + eb = common.HexToAddress(addr) } return } |