tuweni / org.apache.tuweni.devp2p.v5 / DiscoveryV5Service / addPeer

addPeer

open suspend fun addPeer(rlpENR: Bytes): AsyncCompletion (source)

Adds a peer to the routing table.

Parameters

rlpENR - the RLP representation of the peer ENR.

abstract suspend fun addPeer(enr: EthereumNodeRecord, address: SocketAddress = SocketAddress.inetSocketAddress(enr.udp()!!, enr.ip().hostAddress)): AsyncCompletion (source)

Adds a peer to the routing table.

Parameters

enr - the peer Ethereum Node Record

address - optionally, the UDP address to call for this peer.