HomePhabricator

Replace zmqconfig.h by a simple zmqutil.

Description

Replace zmqconfig.h by a simple zmqutil.

Summary:
zmqconfig.h is currently not really needed anywhere, except that
it declares zmqError (which is then defined in
zmqnotificationinterface.cpp). Note in particular that there is
no need to conditionally include zmq.h only if ZMQ is enabled, because
the place in the core code where the ZMQ library itself is included
(init.cpp) is conditional already on that.

This commit removes zmqconfig.h and replaces it by a much simpler
zmqutil.h library for zmqError. The definition of the function is
moved to the matching (newly created) zmqutil.cpp.

This is a backport of core#13686
https://github.com/bitcoin/bitcoin/pull/13686/commits/a3ffb6ebebd753cec294c91cef7c603a30cf217e

See D7579 for why blockdb.h is included instead of validation.h in zmqpublishnotifier.cpp

Depends on D10284

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10285

Details

Provenance
Daniel Kraft <d@domob.eu>Authored on Jul 17 2018, 10:51
PiRKCommitted on Oct 11 2021, 07:01
PiRKPushed on Oct 11 2021, 07:02
Reviewer
Restricted Project
Differential Revision
D10285: Replace zmqconfig.h by a simple zmqutil.
Parents
rABC7a143c308625: Use std::unique_ptr for CZMQNotifierFactory.
Branches
Unknown
Tags
Unknown