From 312263c7d9457fe7c24aac8e42a4cf2efc6ccd8e Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 15 Aug 2016 18:38:32 +0200 Subject: cmd/utils, node: create account manager in package node The account manager was previously created by packge cmd/utils as part of flag processing and then passed down into eth.Ethereum through its config struct. Since we are starting to create nodes which do not have eth.Ethereum as a registered service, the code was rearranged to register the account manager as its own service. Making it a service is ugly though and it doesn't really fix the root cause: creating nodes without eth.Ethereum requires duplicating lots of code. This commit splits utils.MakeSystemNode into three functions, making creation of other node/service configurations easier. It also moves the account manager into Node so it can be used by those configurations without requiring package eth. --- accounts/account_manager.go | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'accounts') diff --git a/accounts/account_manager.go b/accounts/account_manager.go index 982a2ca6e..bfb7556d6 100644 --- a/accounts/account_manager.go +++ b/accounts/account_manager.go @@ -34,8 +34,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/rpc" ) var ( @@ -342,23 +340,3 @@ func zeroKey(k *ecdsa.PrivateKey) { b[i] = 0 } } - -// APIs implements node.Service -func (am *Manager) APIs() []rpc.API { - return nil -} - -// Protocols implements node.Service -func (am *Manager) Protocols() []p2p.Protocol { - return nil -} - -// Start implements node.Service -func (am *Manager) Start(srvr *p2p.Server) error { - return nil -} - -// Stop implements node.Service -func (am *Manager) Stop() error { - return nil -} -- cgit v1.2.3