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

Method Peers

node/api.go:233–239  ·  view source on GitHub ↗

Peers retrieves all the information we know about each individual peer at the protocol granularity.

()

Source from the content-addressed store, hash-verified

231// Peers retrieves all the information we know about each individual peer at the
232// protocol granularity.
233func (api *PublicAdminAPI) Peers() ([]*p2p.PeerInfo, error) {
234 server := api.node.Server()
235 if server == nil {
236 return nil, ErrNodeStopped
237 }
238 return server.PeersInfo(), nil
239}
240
241// NodeInfo retrieves all the information we know about the host node at the
242// protocol granularity.

Callers

nothing calls this directly

Calls 1

ServerMethod · 0.80

Tested by

no test coverage detected