diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-02-07 18:47:34 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-02-13 20:00:07 +0800 |
commit | fad5eb0a87abfc12812647344a26de8a43830182 (patch) | |
tree | a679f37933a85edade15ee69b385b6705cc94043 /eth/backend.go | |
parent | b3c0e9d3ccb0bb326646aea47dda391a9552b122 (diff) | |
download | dexon-fad5eb0a87abfc12812647344a26de8a43830182.tar dexon-fad5eb0a87abfc12812647344a26de8a43830182.tar.gz dexon-fad5eb0a87abfc12812647344a26de8a43830182.tar.bz2 dexon-fad5eb0a87abfc12812647344a26de8a43830182.tar.lz dexon-fad5eb0a87abfc12812647344a26de8a43830182.tar.xz dexon-fad5eb0a87abfc12812647344a26de8a43830182.tar.zst dexon-fad5eb0a87abfc12812647344a26de8a43830182.zip |
accounts, cmd, eth, internal, miner, node: wallets and HD APIs
Diffstat (limited to 'eth/backend.go')
-rw-r--r-- | eth/backend.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/eth/backend.go b/eth/backend.go index 004be7e26..ef3ac93c8 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -364,8 +364,10 @@ func (s *Ethereum) Etherbase() (eb common.Address, err error) { if s.etherbase != (common.Address{}) { return s.etherbase, nil } - if accounts := s.AccountManager().Accounts(); len(accounts) > 0 { - return accounts[0].Address, nil + if wallets := s.AccountManager().Wallets(); len(wallets) > 0 { + if accounts := wallets[0].Accounts(); len(accounts) > 0 { + return accounts[0].Address, nil + } } return common.Address{}, fmt.Errorf("etherbase address must be explicitly specified") } |