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

Method Attach

node/node.go:473–481  ·  view source on GitHub ↗

Attach creates an RPC client attached to an in-process API handler.

()

Source from the content-addressed store, hash-verified

471
472// Attach creates an RPC client attached to an in-process API handler.
473func (n *Node) Attach() (*rpc.Client, error) {
474 n.lock.RLock()
475 defer n.lock.RUnlock()
476
477 if n.server == nil {
478 return nil, ErrNodeStopped
479 }
480 return rpc.DialInProc(n.inprocHandler), nil
481}
482
483// RPCHandler returns the in-process RPC request handler.
484func (n *Node) RPCHandler() (*rpc.Server, error) {

Callers 2

handleWalletFunction · 0.80
TestAPIGatherFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestAPIGatherFunction · 0.64