Page MenuHomePhabricator

RPC: Add new getzmqnotifications method.
ClosedPublic

Authored by Fabien on Nov 14 2019, 16:22.

Details

Summary
This adds a new RPC method "getzmqnotifications", which returns
information about all active ZMQ notification endpoints.  This is useful
for software that layers on top of bitcoind, so it can verify that
ZeroMQ is enabled and also figure out where it should listen.

Backport of core PR13570 and PR13645:
https://github.com/bitcoin/bitcoin/pull/13570/files
https://github.com/bitcoin/bitcoin/pull/13645/files

Test Plan
make check

Run 3 times:

test_runner.py rpc_zmq
  • First time with zmq all on, should pass
  • Second time after uninstalling python3-zmq, should skip (reinstall

after :))

  • Third time after disabling zmq (with configure or cmake), should skip

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Nov 14 2019, 16:22
Herald added a reviewer: Restricted Project. · View Herald TranscriptNov 14 2019, 16:22
deadalnix accepted this revision.Nov 17 2019, 23:22
deadalnix added inline comments.
src/init.cpp
273 ↗(On Diff #14131)

This calls for a unique_ptr, but out of the scope of this patch.

This revision is now accepted and ready to land.Nov 17 2019, 23:22
This revision was automatically updated to reflect the committed changes.