Merge pull request #1283 from ethersphere/frontier/accounts

Account management improvements
This commit is contained in:
Jeffrey Wilcke
2015-07-04 03:40:23 -07:00
10 changed files with 364 additions and 180 deletions

View File

@ -464,17 +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{}) {
primary, err := s.accountManager.Primary()
if err != nil {
return eb, err
}
if (primary == common.Address{}) {
err = fmt.Errorf("no accounts found")
return eb, err
}
eb = primary
err = fmt.Errorf("etherbase address must be explicitly specified")
}
return eb, nil
return
}
func (s *Ethereum) StopMining() { s.miner.Stop() }