Commit 4fd8e52
authored
Use existing peer count metrics loop to check for open_nat toggle (#6800)
* implement update_nat_open function in network_behaviour for tracking incoming peers below a given threshold count
* implement update_nat_open function in network_behaviour for tracking incoming peers below a given threshold count
* tidy logic and comments
* move logic to existing metrics loop
* revert change to network_behaviour protocol check
* clippy
* clippy matches! macro
* pull nat_open check outside of peercounting loop
* missing close bracket
* make threshold const1 parent 587c3e2 commit 4fd8e52
File tree
2 files changed
+48
-3
lines changed- beacon_node/lighthouse_network/src/peer_manager
- peerdb
2 files changed
+48
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
1307 | 1309 | | |
1308 | 1310 | | |
1309 | 1311 | | |
1310 | | - | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
1311 | 1315 | | |
1312 | 1316 | | |
1313 | 1317 | | |
| |||
1336 | 1340 | | |
1337 | 1341 | | |
1338 | 1342 | | |
1339 | | - | |
| 1343 | + | |
1340 | 1344 | | |
1341 | 1345 | | |
1342 | 1346 | | |
| |||
1345 | 1349 | | |
1346 | 1350 | | |
1347 | 1351 | | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
1348 | 1375 | | |
1349 | 1376 | | |
1350 | 1377 | | |
| |||
1375 | 1402 | | |
1376 | 1403 | | |
1377 | 1404 | | |
1378 | | - | |
| 1405 | + | |
1379 | 1406 | | |
1380 | 1407 | | |
1381 | 1408 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
125 | 143 | | |
126 | 144 | | |
127 | 145 | | |
| |||
0 commit comments