From c28ececcb333a024b47c896599cc01b1254c0c72 Mon Sep 17 00:00:00 2001 From: cheatfate Date: Tue, 26 Nov 2024 14:04:59 +0200 Subject: [PATCH] Fix address deserialization. --- beacon_chain/rpc/rest_node_api.nim | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/beacon_chain/rpc/rest_node_api.nim b/beacon_chain/rpc/rest_node_api.nim index df4626559..4f933745d 100644 --- a/beacon_chain/rpc/rest_node_api.nim +++ b/beacon_chain/rpc/rest_node_api.nim @@ -122,9 +122,12 @@ proc getProtocolArgument(ma: MultiAddress, err("Multiaddress codec has not been found") proc getLastSeenAddress(node: BeaconNode, id: PeerId): string = - let address = node.network.switch.peerStore[LastSeenBook][id].valueOr: - return "" - $normalize(address, id) + let + address = node.network.switch.peerStore[LastSeenBook][id].valueOr: + return "" + normalized = address.normalize(id).valueOr: + return "" + $normalized proc getDiscoveryAddresses(node: BeaconNode): seq[string] = let