chore: handle no shard info available

chore: handle no shard info available
This commit is contained in:
Prem Chaitanya Prathi 2024-06-21 10:09:50 +05:30 committed by GitHub
commit 9c0afc2341
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -62,8 +62,14 @@ func main() {
if err != nil { if err != nil {
panic(err) panic(err)
} }
if shards != nil {
fmt.Println("cluster-id: ", shards.ClusterID) fmt.Println("cluster-id: ", shards.ClusterID)
fmt.Println("shards: ", shards.ShardIDs) fmt.Println("shards: ", shards.ShardIDs)
} else {
fmt.Println("cluster-id:", "not available")
fmt.Println("shards:", "not available")
}
DecodeWaku2ENRField(node.Record()) DecodeWaku2ENRField(node.Record())
fmt.Println("multiaddresses:") fmt.Println("multiaddresses:")