mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-28 18:02:44 +02:00
Merge bitcoin/bitcoin#22079: zmq: Add support to listen on IPv6 addresses
e6998838e5
doc: Add IPv6 address to zmq example (nthumann)8abe5703a9
test: Add IPv6 test to zmq (nthumann)ded449b726
zmq: Enable IPv6 on listening socket (nthumann) Pull request description: This PR adds support for listening on IPv6 addresses with bitcoinds ZMQ interface, just like the RPC server. Currently, it is not possible to specify an IPv6 address, as the `ZMQ_IPV6` [socket option](http://api.zeromq.org/master:zmq-setsockopt#toc27) is not set and therefore the ZMQ initialization fails, if one does so. The absence of this option has also been noted [here](https://github.com/bitcoin/bitcoin/issues/15198#issuecomment-617378512). With this PR one can e.g. set `-zmqpubhashblock=tcp://[::1]:28333` to listen on the IPv6 loopback address. ACKs for top commit: laanwj: Code review ACKe6998838e5
theStack: Tested ACKe6998838e5
🌱 Tree-SHA512: 43c3043d8d5c79794d475926259c1be975b694db4fcc1f7750a9a28e242f0fa1b531735a63ea5777498003aa5834f6243f39742d0f3941f2f37593d0c7890700
This commit is contained in:
@@ -84,6 +84,7 @@ For instance:
|
||||
|
||||
$ bitcoind -zmqpubhashtx=tcp://127.0.0.1:28332 \
|
||||
-zmqpubhashtx=tcp://192.168.1.2:28332 \
|
||||
-zmqpubhashblock="tcp://[::1]:28333" \
|
||||
-zmqpubrawtx=ipc:///tmp/bitcoind.tx.raw \
|
||||
-zmqpubhashtxhwm=10000
|
||||
|
||||
@@ -125,6 +126,9 @@ Setting the keepalive values appropriately for your operating environment may
|
||||
improve connectivity in situations where long-lived connections are silently
|
||||
dropped by network middle boxes.
|
||||
|
||||
Also, the socket's ZMQ_IPV6 option is enabled to accept connections from IPv6
|
||||
hosts as well. If needed, this option has to be set on the client side too.
|
||||
|
||||
## Remarks
|
||||
|
||||
From the perspective of bitcoind, the ZeroMQ socket is write-only; PUB
|
||||
|
Reference in New Issue
Block a user