Commit bca346a
committed
net: require P2P binds to succeed
In the Tor case, this prevents us from telling the Tor daemon to send
our incoming connections from the Tor network to an address where we
do not listen (we tried to listen but failed probably because another
application is already listening).
In the other cases (IPv4/IPv6 binds) this also prevents unpleasant
surprises caused by continuing operations even on bind failure. For
example, another application may be listening on portX, bitcoind tries
to bind on portX and portY, only succeeds with portY and continues
operation leaving the user thinking that his bitcoind is listening on
portX whereas another application is listening (the error message in
the log could easily be missed).
Avoid having the functional testing framework start multiple `bitcoind`s
that try to listen on the same `127.0.0.1:18445` (Tor listen for
regtest) if `bind_to_localhost_only` is set to `False`.
Also fix a typo in `test-shell.md` related to `bind_to_localhost_only`.
Fixes bitcoin#227271 parent af55253 commit bca346a
File tree
4 files changed
+43
-12
lines changed- src
- test/functional
- test_framework
4 files changed
+43
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3198 | 3198 | | |
3199 | 3199 | | |
3200 | 3200 | | |
3201 | | - | |
3202 | 3201 | | |
3203 | | - | |
| 3202 | + | |
| 3203 | + | |
| 3204 | + | |
3204 | 3205 | | |
3205 | 3206 | | |
3206 | | - | |
| 3207 | + | |
| 3208 | + | |
| 3209 | + | |
3207 | 3210 | | |
3208 | 3211 | | |
3209 | | - | |
| 3212 | + | |
| 3213 | + | |
| 3214 | + | |
3210 | 3215 | | |
3211 | 3216 | | |
| 3217 | + | |
| 3218 | + | |
| 3219 | + | |
| 3220 | + | |
| 3221 | + | |
| 3222 | + | |
3212 | 3223 | | |
3213 | 3224 | | |
3214 | | - | |
3215 | | - | |
3216 | | - | |
| 3225 | + | |
| 3226 | + | |
| 3227 | + | |
| 3228 | + | |
3217 | 3229 | | |
3218 | | - | |
| 3230 | + | |
3219 | 3231 | | |
3220 | 3232 | | |
3221 | 3233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
| 95 | + | |
| 96 | + | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| |||
210 | 214 | | |
211 | 215 | | |
212 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
213 | 228 | | |
214 | 229 | | |
215 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
355 | 359 | | |
356 | 360 | | |
357 | 361 | | |
| |||
0 commit comments