Commit b0edc68
authored
refactor(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`.
Pull-Request: #6209.1 parent a0bf993 commit b0edc68
2 files changed
Lines changed: 21 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
| 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 | + | |
| 2144 | + | |
| 2145 | + | |
2143 | 2146 | | |
2144 | 2147 | | |
2145 | 2148 | | |
| |||
2159 | 2162 | | |
2160 | 2163 | | |
2161 | 2164 | | |
2162 | | - | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
2163 | 2172 | | |
2164 | | - | |
| 2173 | + | |
| 2174 | + | |
2165 | 2175 | | |
2166 | 2176 | | |
2167 | 2177 | | |
2168 | | - | |
2169 | | - | |
2170 | | - | |
2171 | | - | |
2172 | | - | |
| 2178 | + | |
2173 | 2179 | | |
2174 | 2180 | | |
2175 | 2181 | | |
| |||
0 commit comments