MCPcopy Create free account
hub / github.com/encodeous/nylon / checkNeigh

Method checkNeigh

core/router.go:271–279  ·  view source on GitHub ↗
(id state.NodeId)

Source from the content-addressed store, hash-verified

269}
270
271func (n *Nylon) checkNeigh(id state.NodeId) bool {
272 for _, node := range n.RouterState.Neighbours {
273 if node.Id == id {
274 return true
275 }
276 }
277 n.router.log.Warn("received packet from unknown neighbour", "from", id)
278 return false
279}
280
281func (n *Nylon) checkPrefix(prefix netip.Prefix) bool {
282 for _, p := range n.GetPrefixes() {

Callers 3

Calls

no outgoing calls

Tested by

no test coverage detected