Page MenuHomePhabricator

Replace zmqconfig.h by a simple zmqutil.
ClosedPublic

Authored by PiRK on Oct 8 2021, 12:00.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCdf5197f20ddf: 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