MCPcopy Create free account
hub / github.com/ElementsProject/elements / BlockConnected

Method BlockConnected

src/zmq/zmqnotificationinterface.cpp:161–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161void CZMQNotificationInterface::BlockConnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexConnected)
162{
163 for (const CTransactionRef& ptx : pblock->vtx) {
164 const CTransaction& tx = *ptx;
165 TryForEachAndRemoveFailed(notifiers, [&tx](CZMQAbstractNotifier* notifier) {
166 return notifier->NotifyTransaction(tx);
167 });
168 }
169
170 // Next we notify BlockConnect listeners for *all* blocks
171 TryForEachAndRemoveFailed(notifiers, [pindexConnected](CZMQAbstractNotifier* notifier) {
172 return notifier->NotifyBlockConnect(pindexConnected);
173 });
174}
175
176void CZMQNotificationInterface::BlockDisconnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexDisconnected)
177{

Callers

nothing calls this directly

Calls 3

NotifyTransactionMethod · 0.45
NotifyBlockConnectMethod · 0.45

Tested by

no test coverage detected