Skip to content

Commit 821ee14

Browse files
committed
change black hole threshold to 5 successes out of 100
1 parent 555a36a commit 821ee14

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dashboards/swarm/swarm.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"type": "grafana",
2222
"id": "grafana",
2323
"name": "Grafana",
24-
"version": "9.3.6"
24+
"version": "10.0.1"
2525
},
2626
{
2727
"type": "panel",
@@ -3233,7 +3233,7 @@
32333233
},
32343234
{
32353235
"color": "green",
3236-
"value": 1
3236+
"value": 5
32373237
}
32383238
]
32393239
}

p2p/net/swarm/black_hole_detector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ func newBlackHoleDetector(detectUDP, detectIPv6 bool, mt MetricsTracer) *blackHo
245245
d := &blackHoleDetector{}
246246

247247
// A black hole is a binary property. On a network if UDP dials are blocked or there is
248-
// no IPv6 connectivity, all dials will fail. So a low success rate of 3 out 100 dials
248+
// no IPv6 connectivity, all dials will fail. So a low success rate of 5 out 100 dials
249249
// is good enough.
250250
if detectUDP {
251-
d.udp = &blackHoleFilter{n: 100, minSuccesses: 3, name: "UDP", metricsTracer: mt}
251+
d.udp = &blackHoleFilter{n: 100, minSuccesses: 5, name: "UDP", metricsTracer: mt}
252252
}
253253
if detectIPv6 {
254-
d.ipv6 = &blackHoleFilter{n: 100, minSuccesses: 3, name: "IPv6", metricsTracer: mt}
254+
d.ipv6 = &blackHoleFilter{n: 100, minSuccesses: 5, name: "IPv6", metricsTracer: mt}
255255
}
256256
return d
257257
}

0 commit comments

Comments
 (0)