Fix address deserialization.
This commit is contained in:
parent
8ec1c610e2
commit
c28ececcb3
|
@ -122,9 +122,12 @@ proc getProtocolArgument(ma: MultiAddress,
|
||||||
err("Multiaddress codec has not been found")
|
err("Multiaddress codec has not been found")
|
||||||
|
|
||||||
proc getLastSeenAddress(node: BeaconNode, id: PeerId): string =
|
proc getLastSeenAddress(node: BeaconNode, id: PeerId): string =
|
||||||
let address = node.network.switch.peerStore[LastSeenBook][id].valueOr:
|
let
|
||||||
|
address = node.network.switch.peerStore[LastSeenBook][id].valueOr:
|
||||||
return ""
|
return ""
|
||||||
$normalize(address, id)
|
normalized = address.normalize(id).valueOr:
|
||||||
|
return ""
|
||||||
|
$normalized
|
||||||
|
|
||||||
proc getDiscoveryAddresses(node: BeaconNode): seq[string] =
|
proc getDiscoveryAddresses(node: BeaconNode): seq[string] =
|
||||||
let
|
let
|
||||||
|
|
Loading…
Reference in New Issue