mirror of
https://github.com/status-im/nim-dagger.git
synced 2025-02-13 23:27:51 +00:00
16 lines
287 B
Nim
16 lines
287 B
Nim
import pkg/libp2p/peerinfo
|
|
import pkg/libp2p/cid
|
|
|
|
export peerinfo
|
|
export cid
|
|
|
|
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
|