Commit 1393bf6
committed
p2p: Evict outbound connections to -blocksonly peers when at full outbound maximum
...unless we are in -blocksonly mode ourselve or in ibd.
If we had too many outbound peers not participating in tx relay, we would run
into problems with getting own transaction relayed. This would also be
bad for privacy and fee estimation.
We evict non-txrelay peers only when all full outbound slots
are filled to have peers in hypothetical situations where
-blocksonly peers are the only ones available.
Idea for this approach by ajtowns.1 parent 4d7b787 commit 1393bf6
4 files changed
+29
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2347 | 2347 | | |
2348 | 2348 | | |
2349 | 2349 | | |
| 2350 | + | |
2350 | 2351 | | |
2351 | 2352 | | |
2352 | 2353 | | |
2353 | 2354 | | |
2354 | 2355 | | |
2355 | | - | |
| 2356 | + | |
2356 | 2357 | | |
2357 | 2358 | | |
2358 | 2359 | | |
| |||
2363 | 2364 | | |
2364 | 2365 | | |
2365 | 2366 | | |
2366 | | - | |
| 2367 | + | |
2367 | 2368 | | |
2368 | 2369 | | |
2369 | 2370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1173 | 1173 | | |
1174 | 1174 | | |
1175 | 1175 | | |
1176 | | - | |
| 1176 | + | |
| 1177 | + | |
1177 | 1178 | | |
1178 | 1179 | | |
1179 | 1180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5183 | 5183 | | |
5184 | 5184 | | |
5185 | 5185 | | |
5186 | | - | |
| 5186 | + | |
| 5187 | + | |
5187 | 5188 | | |
5188 | 5189 | | |
5189 | 5190 | | |
| |||
5241 | 5242 | | |
5242 | 5243 | | |
5243 | 5244 | | |
| 5245 | + | |
| 5246 | + | |
| 5247 | + | |
| 5248 | + | |
| 5249 | + | |
| 5250 | + | |
| 5251 | + | |
| 5252 | + | |
| 5253 | + | |
| 5254 | + | |
| 5255 | + | |
| 5256 | + | |
| 5257 | + | |
| 5258 | + | |
| 5259 | + | |
| 5260 | + | |
| 5261 | + | |
| 5262 | + | |
| 5263 | + | |
| 5264 | + | |
| 5265 | + | |
5244 | 5266 | | |
5245 | 5267 | | |
5246 | 5268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
0 commit comments