From d705661ad346c01e77641baf3349f5031ae2b0a5 Mon Sep 17 00:00:00 2001 From: Gabriel mermelstein Date: Fri, 4 Apr 2025 12:06:17 +0300 Subject: [PATCH] adding comment --- waku/common/peers.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/waku/common/peers.go b/waku/common/peers.go index 35f2ad1..3a233ad 100644 --- a/waku/common/peers.go +++ b/waku/common/peers.go @@ -17,6 +17,25 @@ type PeerInfo struct { } func ParsePeerInfoFromJSON(jsonStr string) (PeersData, error) { + /* + We expect a JSON string with the format: + + { + : { + "protocols": [ + "protocol1", + "protocol2", + ... + ], + "addresses": [ + "address1", + "address2", + ... + ] + }, + : ... + } + */ // Create a temporary map to unmarshal the JSON data var rawMap map[string]struct { Protocols []string `json:"protocols"`