Add accessor for the discv5 listening address (Protocol.bindAddress)

This commit is contained in:
Zahary Karadjov 2021-09-29 01:43:00 +03:00
parent 9f2f101070
commit 5327565f95
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 3 additions and 0 deletions

View File

@ -928,6 +928,9 @@ proc newProtocol*(privKey: PrivateKey,
routingTable: RoutingTable.init(node, DefaultBitsPerHop, tableIpLimits, rng),
rng: rng)
template listeningAddress*(p: Protocol): Address =
p.bindAddress
proc open*(d: Protocol) {.raises: [Defect, CatchableError].} =
info "Starting discovery node", node = d.localNode,
bindAddress = d.bindAddress