MCPcopy Create free account
hub / github.com/KOSASIH/skybridge / AddNeighbor

Method AddNeighbor

src/node/node.go:26–28  ·  view source on GitHub ↗

AddNeighbor adds a neighbor to the node

(neighbor *Node)

Source from the content-addressed store, hash-verified

24
25// AddNeighbor adds a neighbor to the node
26func (n *Node) AddNeighbor(neighbor *Node) {
27 n.neighbors = append(n.neighbors, neighbor)
28}
29
30// GetNeighbors returns the node's neighbors
31func (n *Node) GetNeighbors() []*Node {

Callers 1

TestNodeFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestNodeFunction · 0.76