Working towards using poll() on unix like systems.
A number of small changes designed to separate the actual socket handling from the rest of the logic in ThreadSocketHandler.
This is a simpler version of #14147
<!--e57a25ab6845829454e8d69fc972939a-->Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
utACK 032488e6e7b4c2d37f3f434d575d25806ddcb0b0. PR description above should contain an actual description of the changes, though, and not just reference #14147. (This PR seems the same as #14147 except it replaces InactivityChecks with InactivityCheck and moves it below NotifyNumConnectionsChanged. I'm actually not sure why #14147 was closed and replaced instead of just updated.)
@ryanofsky I wanted to simplify the changes to the point that they are as obviously correct as possible.
All of these changes are now just moving logic to functions.
<!--32850dd3fdea838b4049e64f46995ea2-->
| Coverage | Change (pull 14335) | Reference (master) |
|---|---|---|
| Lines | +0.0012 % | 87.0361 % |
| Functions | +0.0252 % | 84.1130 % |
| Branches | -0.0026 % | 51.5451 % |
utACK 032488e6e7b4c2d37f3f434d575d25806ddcb0b0. Nice to see logic moved out of those giant blocks of code.
utACK - looks much better 👍
utACK https://github.com/bitcoin/bitcoin/commit/032488e6e7b4c2d37f3f434d575d25806ddcb0b0, nice refactor
utACK caa08261d1fa1e699b4e649b644dd4f3520de755
post-merge utACK 032488e6e7b4c2d37f3f434d575d25806ddcb0b0