tuweni / org.apache.tuweni.devp2p.v5.storage / RoutingTable

RoutingTable

class RoutingTable (source)

Constructors

<init>

RoutingTable(selfEnr: Bytes)

Properties

size

val size: Int

Functions

add

fun add(enr: Bytes): Unit

clear

fun clear(): Unit

distanceToSelf

fun distanceToSelf(targetId: Bytes): Int

evict

fun evict(enr: Bytes): Boolean

getSelfEnr

fun getSelfEnr(): Bytes

isEmpty

fun isEmpty(): Boolean

nearest

fun nearest(targetId: Bytes, limit: Int = BUCKET_SIZE): List<Bytes>

nodesOfDistance

fun nodesOfDistance(distance: Int): List<Bytes>

random

fun random(): Bytes