mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-02-02 04:33:19 +00:00
12 lines
228 B
Nim
12 lines
228 B
Nim
import pkg/libp2p
|
|
|
|
type
|
|
RoutingTable* = object
|
|
peers: seq[PeerInfo]
|
|
|
|
proc add*(table: var RoutingTable, peer: PeerInfo) =
|
|
table.peers.add(peer)
|
|
|
|
proc closest*(table: RoutingTable, id: Cid): seq[PeerInfo] =
|
|
table.peers
|