MCPcopy Create free account
hub / github.com/CPChain/chain / Restart

Method Restart

node/node.go:462–470  ·  view source on GitHub ↗

Restart terminates a running node and boots up a new one in its place. If the node isn't running, an error is returned.

()

Source from the content-addressed store, hash-verified

460// Restart terminates a running node and boots up a new one in its place. If the
461// node isn't running, an error is returned.
462func (n *Node) Restart() error {
463 if err := n.Stop(); err != nil {
464 return err
465 }
466 if err := n.Start(); err != nil {
467 return err
468 }
469 return nil
470}
471
472// Attach creates an RPC client attached to an in-process API handler.
473func (n *Node) Attach() (*rpc.Client, error) {

Callers 3

ExampleServiceFunction · 0.80
TestNodeLifeCycleFunction · 0.80
TestServiceRestartsFunction · 0.80

Calls 2

StopMethod · 0.95
StartMethod · 0.95

Tested by 3

ExampleServiceFunction · 0.64
TestNodeLifeCycleFunction · 0.64
TestServiceRestartsFunction · 0.64