MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / Resolve

Method Resolve

rpc/mux/resolve.go:62–74  ·  view source on GitHub ↗

Resolve implements the node ID resolver using the BP network with mux-RPC protocol.

(id *proto.RawNodeID)

Source from the content-addressed store, hash-verified

60
61// Resolve implements the node ID resolver using the BP network with mux-RPC protocol.
62func (r *Resolver) Resolve(id *proto.RawNodeID) (string, error) {
63 if r.direct {
64 node, err := GetNodeInfo(id)
65 if err != nil {
66 return "", err
67 }
68 if node.Role == proto.Miner {
69 return node.DirectAddr, nil
70 }
71 return node.Addr, nil
72 }
73 return GetNodeAddr(id)
74}
75
76// ResolveEx implements the node ID resolver extended method using the BP network
77// with mux-RPC protocol.

Callers

nothing calls this directly

Calls 2

GetNodeAddrFunction · 0.85
GetNodeInfoFunction · 0.70

Tested by

no test coverage detected