Changeset View
Changeset View
Standalone View
Standalone View
src/validationinterface.cpp
Show First 20 Lines • Show All 229 Lines • ▼ Show 20 Lines | auto event = [pblock, pindex, pvtxConflicted, this] { | ||||
callbacks.BlockConnected(pblock, pindex, *pvtxConflicted); | callbacks.BlockConnected(pblock, pindex, *pvtxConflicted); | ||||
}); | }); | ||||
}; | }; | ||||
ENQUEUE_AND_LOG_EVENT(event, "%s: block hash=%s block height=%d", __func__, | ENQUEUE_AND_LOG_EVENT(event, "%s: block hash=%s block height=%d", __func__, | ||||
pblock->GetHash().ToString(), pindex->nHeight); | pblock->GetHash().ToString(), pindex->nHeight); | ||||
} | } | ||||
void CMainSignals::BlockDisconnected( | void CMainSignals::BlockDisconnected( | ||||
const std::shared_ptr<const CBlock> &pblock) { | const std::shared_ptr<const CBlock> &pblock, const CBlockIndex *pindex) { | ||||
// TODO: This function was refactored as part of an out-of-order backport | auto event = [pblock, pindex, this] { | ||||
// of https://github.com/bitcoin/bitcoin/pull/16688 | |||||
auto event = [pblock, this] { | |||||
m_internals->Iterate([&](CValidationInterface &callbacks) { | m_internals->Iterate([&](CValidationInterface &callbacks) { | ||||
callbacks.BlockDisconnected(pblock); | callbacks.BlockDisconnected(pblock, pindex); | ||||
}); | }); | ||||
}; | }; | ||||
ENQUEUE_AND_LOG_EVENT(event, "%s: block hash=%s", __func__, | ENQUEUE_AND_LOG_EVENT(event, "%s: block hash=%s", __func__, | ||||
pblock->GetHash().ToString()); | pblock->GetHash().ToString()); | ||||
} | } | ||||
void CMainSignals::ChainStateFlushed(const CBlockLocator &locator) { | void CMainSignals::ChainStateFlushed(const CBlockLocator &locator) { | ||||
auto event = [locator, this] { | auto event = [locator, this] { | ||||
Show All 25 Lines |