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"`