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

Method NodeInfo

node/api.go:243–249  ·  view source on GitHub ↗

NodeInfo retrieves all the information we know about the host node at the protocol granularity.

()

Source from the content-addressed store, hash-verified

241// NodeInfo retrieves all the information we know about the host node at the
242// protocol granularity.
243func (api *PublicAdminAPI) NodeInfo() (*p2p.NodeInfo, error) {
244 server := api.node.Server()
245 if server == nil {
246 return nil, ErrNodeStopped
247 }
248 return server.NodeInfo(), nil
249}
250
251// Datadir retrieves the current data directory the node is using.
252func (api *PublicAdminAPI) Datadir() string {

Callers

nothing calls this directly

Calls 2

ServerMethod · 0.80
NodeInfoMethod · 0.65

Tested by

no test coverage detected