cmd, eth, node, rpc, xeth: use single-instance services
This commit is contained in:
@ -97,7 +97,7 @@ func NewAdminApi(xeth *xeth.XEth, stack *node.Node, codec codec.Codec) *adminApi
|
||||
coder: codec.New(nil),
|
||||
}
|
||||
if stack != nil {
|
||||
stack.SingletonService(&api.ethereum)
|
||||
stack.Service(&api.ethereum)
|
||||
}
|
||||
return api
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ func ParseApiString(apistr string, codec codec.Codec, xeth *xeth.XEth, stack *no
|
||||
|
||||
var eth *eth.Ethereum
|
||||
if stack != nil {
|
||||
if _, err := stack.SingletonService(ð); err != nil {
|
||||
if err := stack.Service(ð); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user