CZMQPublishRawBlockNotifier::NotifyBlock
is called it calls ReadBlockFromDisk
with the passed in block index. However, we will always have already read this block into memory during ActivateBestChain
and use it to call BlockConnected
. We can check for the tip block there and pass that into UpdatedBlockTip
to avoid having the zmq notifier read the block. This also has the benefit of removing the node/blockstorage.h
dependency entirely from the zmq code, so we can continue working to remove ReadBlockFromDisk
out of global scope (https://github.com/bitcoin/bitcoin/pull/26316#discussion_r1000954807).