Changeset View
Changeset View
Standalone View
Standalone View
src/validationinterface.cpp
Show First 20 Lines • Show All 253 Lines • ▼ Show 20 Lines | auto event = [locator, this] { | ||||
}); | }); | ||||
}; | }; | ||||
ENQUEUE_AND_LOG_EVENT(event, "%s: block hash=%s", __func__, | ENQUEUE_AND_LOG_EVENT(event, "%s: block hash=%s", __func__, | ||||
locator.IsNull() ? "null" | locator.IsNull() ? "null" | ||||
: locator.vHave.front().ToString()); | : locator.vHave.front().ToString()); | ||||
} | } | ||||
void CMainSignals::BlockChecked(const CBlock &block, | void CMainSignals::BlockChecked(const CBlock &block, | ||||
const CValidationState &state) { | const BlockValidationState &state) { | ||||
LOG_EVENT("%s: block hash=%s state=%s", __func__, | LOG_EVENT("%s: block hash=%s state=%s", __func__, | ||||
block.GetHash().ToString(), FormatStateMessage(state)); | block.GetHash().ToString(), FormatStateMessage(state)); | ||||
m_internals->Iterate([&](CValidationInterface &callbacks) { | m_internals->Iterate([&](CValidationInterface &callbacks) { | ||||
callbacks.BlockChecked(block, state); | callbacks.BlockChecked(block, state); | ||||
}); | }); | ||||
} | } | ||||
void CMainSignals::NewPoWValidBlock( | void CMainSignals::NewPoWValidBlock( | ||||
const CBlockIndex *pindex, const std::shared_ptr<const CBlock> &block) { | const CBlockIndex *pindex, const std::shared_ptr<const CBlock> &block) { | ||||
LOG_EVENT("%s: block hash=%s", __func__, block->GetHash().ToString()); | LOG_EVENT("%s: block hash=%s", __func__, block->GetHash().ToString()); | ||||
m_internals->Iterate([&](CValidationInterface &callbacks) { | m_internals->Iterate([&](CValidationInterface &callbacks) { | ||||
callbacks.NewPoWValidBlock(pindex, block); | callbacks.NewPoWValidBlock(pindex, block); | ||||
}); | }); | ||||
} | } |