Repository navigation
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. External sites
ReviewsSee the guideline and AI policy for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
🚧 At least one of the CI tasks failed. HintsTry to run the tests locally, according to the documentation. However, a CI failure may still
Leave a comment here, if you need help tracking down a confusing failure. |

While messing around with various zmq data ingestion setups for a side project I initially was perplexed because my node kept returning an empty array when I called
bitcoin-cli getzmqnotificationseven though I had 4 zmq emitters configured.Upon closer inspection, it looks like if a single zmq config is invalid / fails to be bound, it prevents all other zmq configurations from being bound. And even worse, the failure occurs silently.
The goal of this PR is to not allow one invalid config to prevent valid configs from working and to make binding failures more obvious in the node logs. Alternatively, if reviewers find it preferable, we could make any zmq bind failure to be a hard error that blocks the node from launching.
Initialize() now attempts every configured notifier, erases only the failed ones, and returns success if at least one remains. Failures are logged:
getzmqnotifications now reports the surviving notifiers instead of returning [].
Added ZMQAddressKey() to canonicalize addresses for socket sharing:
Each notifier now stores its canonical key, Shutdown() uses it, and failed init paths clear psocket after zmq_close() to avoid the previous double-close hazard.