tuweni / org.apache.tuweni.devp2p / PeerRoutingTable

PeerRoutingTable

interface PeerRoutingTable : Set<Peer> (source)

A routing table for ÐΞVp2p peers.

Functions

add

abstract fun add(node: Peer): Peer?

Add a node to the table.

evict

abstract fun evict(node: Peer): Boolean

Remove a node from the table, potentially adding an alternative from the replacement cache.

nearest

abstract fun nearest(targetId: PublicKey, limit: Int): List<Peer>

Return the nearest nodes to a target id, in order from closest to furthest.

Inheritors

DevP2PPeerRoutingTable

class DevP2PPeerRoutingTable : PeerRoutingTable

A Peer routing table for the Ethereum ÐΞVp2p network.