mirror of
https://github.com/aljazceru/wot-relay.git
synced 2025-12-18 14:54:19 +01:00
check for tag length before adding
This commit is contained in:
2
main.go
2
main.go
@@ -265,8 +265,10 @@ func refreshTrustNetwork(relay *khatru.Relay, ctx context.Context) {
|
||||
|
||||
for ev := range pool.SubManyEose(timeout, seedRelays, filters) {
|
||||
for _, contact := range ev.Event.Tags.GetAll([]string{"p"}) {
|
||||
if len(contact) > 1 {
|
||||
pubkeyFollowerCount[contact[1]]++ // Increment follower count for the pubkey
|
||||
}
|
||||
}
|
||||
|
||||
for _, relay := range ev.Event.Tags.GetAll([]string{"r"}) {
|
||||
appendRelay(relay[1])
|
||||
|
||||
Reference in New Issue
Block a user