-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin/bitcoin#20196: net: fix GetListenPort() to derive the p…
…roper port 7d64ea4 net: only assume all local addresses if listening on any (Vasil Dimov) 0cfc0cd net: fix GetListenPort() to derive the proper port (Vasil Dimov) f98cdcb net: pass Span by value to CaptureMessage() (Vasil Dimov) 3cb9d9c net: make CaptureMessage() mockable (Vasil Dimov) 43868ba timedata: rename variables to match the coding style (Vasil Dimov) 60da1ea timedata: make it possible to reset the state (Vasil Dimov) Pull request description: `GetListenPort()` uses a simple logic: "if `-port=P` is given, then we must be listening on `P`, otherwise we must be listening on `8333`". This is however not true if `-bind=` has been provided with `:port` part or if `-whitebind=` has been provided. Thus, extend `GetListenPort()` to return the port from `-bind=` or `-whitebind=`, if any. Also, if `-bind=` is provided then we would bind only to a particular address and should not add all the other addresses of the machine to the list of local addresses. Fixes bitcoin/bitcoin#20184 ACKs for top commit: sipa: utACK 7d64ea4. I didn't review the tests in detail. jonatack: re-ACK 7d64ea4 per `git range-diff 08bcfa2 35ec977 7d64ea4`, changes are rebase-only, light re-review, re-ran the new tests locally Tree-SHA512: 45135ab9c0ec3cc8c83e3b3e58a1c1f77eaeaba00618d54f1010db1d23d6db7d9c0dc7807e72ebc34e8b2d0e91f1e0d0e9239d13b90f1bdce8be84459e7837f0
- Loading branch information
Showing
12 changed files
with
454 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.