Commit 202378f
committed
gossipsub: in-place negative-score peer removal
This change improves peer removal during `heartbeat` by switching
from a two-pass remove logic to an in-place `retain` with very small
size intermediate variable `removed_peers_count`.
Signed-off-by: Onur Özkan <work@onurozkan.dev>1 parent ac1404e commit 202378f
1 file changed
+15
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2135 | 2135 | | |
2136 | 2136 | | |
2137 | 2137 | | |
2138 | | - | |
2139 | | - | |
2140 | | - | |
2141 | | - | |
2142 | | - | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
2143 | 2143 | | |
2144 | 2144 | | |
2145 | 2145 | | |
| |||
2159 | 2159 | | |
2160 | 2160 | | |
2161 | 2161 | | |
2162 | | - | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
2163 | 2169 | | |
2164 | | - | |
| 2170 | + | |
| 2171 | + | |
2165 | 2172 | | |
2166 | 2173 | | |
2167 | 2174 | | |
2168 | | - | |
2169 | | - | |
2170 | | - | |
2171 | | - | |
2172 | | - | |
| 2175 | + | |
2173 | 2176 | | |
2174 | 2177 | | |
2175 | 2178 | | |
| |||
0 commit comments