chore: handle no shard info available

This commit is contained in:
Richard Ramos 2024-06-20 08:51:06 -04:00
parent 61e4a40bea
commit 5461ed2cf4
No known key found for this signature in database
GPG Key ID: 1CE87DB518195760

10
main.go
View File

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