History
This picks up #33727, which was closed for inactivity
Problem
Currently when a user configures -zmqpub* and the socket can't be bound, the program proceeds normally. The only trace is a debug-level log line that's invisible in a default configuration.
#33715 hit this when their port was already taken.
What this PR does
The node refuses to start if ZMQ is configured and setup failed. This failure is now logged at error level.
Code path: GetNotifiers builds the notifier objects from the config; Create initializes them — starts the ZMQ engine and binds each socket. When initialization fails, Initialize() returns false. Create() sees the result and returns nullptr. init.cpp sees it and returns InitError. On a node with no -zmqpub* option, the notifier list is empty.
Why abort?
#17445 fixed bitcoind crash from bad assert due to ZMQ config (issue #17185). Issue #33715 reports that when ZMQ port was already taken, bitcoind started but user could not see anything with getzmqnotifications. Maintainers at the time agreed it should log louder and abort at startup. Which is what this PR fixes.
Testing
bitcoind -regtest -zmqpubhashblock=foo Result: exits with code 1, and prints:
[error] zmq: Failed to bind address, msg: Invalid argument Error: Initializing ZMQ interface failed.
A node with no -zmqpub* options starts exactly as before — nothing changes for nodes that don't use ZMQ.