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.
<init> |
Create a new ÐΞVp2p routing table. DevP2PPeerRoutingTable(selfId: PublicKey) |
size |
val size: Int |
add |
Add a node to the table. fun add(node: Peer): Peer? |
contains |
fun contains(element: Peer): Boolean |
containsAll |
fun containsAll(elements: Collection<Peer>): Boolean |
evict |
Remove a node from the table, potentially adding an alternative from the replacement cache. fun evict(node: Peer): Boolean |
isEmpty |
fun isEmpty(): Boolean |
iterator |
fun iterator(): Iterator<Peer> |
nearest |
Return the nearest nodes to a target id, in order from closest to furthest. fun nearest(targetId: PublicKey, limit: Int): List<Peer> |