class DevP2PPeerRoutingTable : PeerRoutingTable
(source)
A Peer routing table for the Ethereum ÐΞVp2p network.
This is an implementation of a KademliaRoutingTable using keccak256 hashed node ids and a k-bucket size of 6.
DevP2PPeerRoutingTable(selfId: PublicKey)
Create a new ÐΞVp2p routing table. |
val size: Int |
fun add(node: Peer): Peer?
Add a node to the table. |
|
fun contains(element: Peer): Boolean |
|
fun containsAll(elements: Collection<Peer>): Boolean |
|
fun evict(node: Peer): Boolean
Remove a node from the table, potentially adding an alternative from the replacement cache. |
|
fun isEmpty(): Boolean |
|
fun iterator(): Iterator<Peer> |
|
fun nearest(targetId: PublicKey, limit: Int): List<Peer>
Return the nearest nodes to a target id, in order from closest to furthest. |