HomePhabricator

zmq: Pass lambda to zmq's ZMQPublishRawBlockNotifier

Description

zmq: Pass lambda to zmq's ZMQPublishRawBlockNotifier

Summary:
The lambda captures a reference to the chainman unique_ptr to retrieve
block data. An assert is added on the chainman to ensure that the lambda
is not used while the chainman is uninitialized.

This is done in preparation for the following commits where blockstorage
functions are made BlockManager methods.

This is a partial backport of core#27125
https://github.com/bitcoin/bitcoin/pull/27125/commits/cfbb2124939822e95265a39242ffca3d86bac6e8

Depends on D16182

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
TheCharlatan <seb.kung@gmail.com>Authored on May 3 2023, 20:24
PiRKCommitted on May 21 2024, 15:00
PiRKPushed on May 21 2024, 15:00
Reviewer
Restricted Project
Differential Revision
D16183: zmq: Pass lambda to zmq's ZMQPublishRawBlockNotifier
Parents
rABC1b5e4c74d4d5: refactor: Declare g_zmq_notification_interface as unique_ptr
Branches
Unknown
Tags
Unknown