https://github.com/bitcoin/bitcoin/pull/16404/commits/aa2622a726bc0f02152d79c888a332694678a989
Partial backport of Core [[https://github.com/bitcoin/bitcoin/pull/16404 | PR16404]] and [[https://github.com/bitcoin/bitcoin/pull/16740| PR16740]] (PR16404 on its own is broken and will not pass otherwise, sorry)
notes:
~~* test looks to be wrong. socket.connect() is running before there is a node with the proper `-zmqxx=xx` CLI parameters set, so I moved it accordingly.~~