Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
251pindex->nHeight);252auto event = [pblock = std::move(pblock), pindex, this] {253m_internals->Iterate([&](CValidationInterface& callbacks) { callbacks.BlockDisconnected(pblock, pindex); });254};255ENQUEUE_AND_LOG_EVENT(std::move(event), std::move(log_msg));256}258void ValidationSignals::ChainStateFlushed(const ChainstateRole& role, const CBlockLocator& locator)259{260auto log_msg = LOG_MSG("%s: block hash=%s", __func__,261locator.IsNull() ? "null" : locator.vHave.front().ToString());262auto event = [role, locator, this] {263m_internals->Iterate([&](CValidationInterface& callbacks) { callbacks.ChainStateFlushed(role, locator); });264};265ENQUEUE_AND_LOG_EVENT(std::move(event), std::move(log_msg));266}268void ValidationSignals::BlockChecked(const std::shared_ptr<const CBlock>& block, const BlockValidationState& state)269{270LOG_EVENT("%s: block hash=%s state=%s", __func__,271block->GetHash().ToString(), state.ToString());272m_internals->Iterate([&](CValidationInterface& callbacks) { callbacks.BlockChecked(block, state); });273}275void ValidationSignals::NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock> &block) {276LOG_EVENT("%s: block hash=%s", __func__, block->GetHash().ToString());277m_internals->Iterate([&](CValidationInterface& callbacks) { callbacks.NewPoWValidBlock(pindex, block); });278}
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.