mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
node.go
This commit is contained in:
parent
1fc5827618
commit
a01770babd
3 changed files with 5 additions and 6 deletions
|
|
@ -232,7 +232,7 @@ func (api *PrivateAdminAPI) StartWS(host *string, port *int, allowedOrigins *str
|
|||
}
|
||||
}
|
||||
|
||||
modules := api.node.config.WSModules
|
||||
modules := api.node.config.WSModxules
|
||||
if apis != nil {
|
||||
modules = nil
|
||||
for _, m := range strings.Split(*apis, ",") {
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ func (n *Node) Register(constructor ServiceConstructor) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Start create a live P2P node and starts running it.
|
||||
// Start creates a live P2P node and starts running it.
|
||||
func (n *Node) Start() error {
|
||||
n.lock.Lock()
|
||||
defer n.lock.Unlock()
|
||||
|
|
@ -235,7 +235,7 @@ func (n *Node) Start() error {
|
|||
// Mark the service started for potential cleanup
|
||||
started = append(started, kind)
|
||||
}
|
||||
// Lastly start the configured RPC interfaces
|
||||
// Lastly, start the configured RPC interfaces
|
||||
if err := n.startRPC(services); err != nil {
|
||||
for _, service := range services {
|
||||
service.Stop()
|
||||
|
|
@ -274,8 +274,8 @@ func (n *Node) openDataDir() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// startRPC is a helper method to start all the various RPC endpoint during node
|
||||
// startup. It's not meant to be called at any time afterwards as it makes certain
|
||||
// startRPC is a helper method to start all the various RPC endpoints during node
|
||||
// startup. It's not meant to be called at any time afterwards, as it makes certain
|
||||
// assumptions about the state of the node.
|
||||
func (n *Node) startRPC(services map[reflect.Type]Service) error {
|
||||
// Gather all the possible APIs to surface
|
||||
|
|
|
|||
|
|
@ -102,7 +102,6 @@ func StartWSEndpoint(endpoint string, apis []API, modules []string, wsOrigins []
|
|||
}
|
||||
go NewWSServer(wsOrigins, handler).Serve(listener)
|
||||
return listener, handler, err
|
||||
|
||||
}
|
||||
|
||||
// StartIPCEndpoint starts an IPC endpoint.
|
||||
|
|
|
|||
Loading…
Reference in a new issue