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

Function selRouteProto

core/ipc_handler.go:357–369  ·  view source on GitHub ↗
(route state.SelRoute)

Source from the content-addressed store, hash-verified

355}
356
357func selRouteProto(route state.SelRoute) *protocol.SelRoute {
358 retractedBy := make([]string, 0, len(route.RetractedBy))
359 for _, id := range route.RetractedBy {
360 retractedBy = append(retractedBy, string(id))
361 }
362 slices.Sort(retractedBy)
363 return &protocol.SelRoute{
364 PubRoute: pubRouteProto(route.PubRoute),
365 Nh: string(route.Nh),
366 ExpireAtUnix: route.ExpireAt.Unix(),
367 RetractedBy: retractedBy,
368 }
369}
370
371func keyString(key state.NyPublicKey) string {
372 text, err := key.MarshalText()

Callers 1

buildRouteTablesFunction · 0.85

Calls 1

pubRouteProtoFunction · 0.85

Tested by

no test coverage detected