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.
251m_event_handlers.emplace_back(m_node.handleShowProgress(252[this](const std::string& title, int progress, [[maybe_unused]] bool resume_possible) {253Q_EMIT showProgress(QString::fromStdString(title), progress);254}));255m_event_handlers.emplace_back(m_node.handleNotifyNumConnectionsChanged(256[this](int new_num_connections) {257Q_EMIT numConnectionsChanged(new_num_connections);258}));259m_event_handlers.emplace_back(m_node.handleNotifyNetworkActiveChanged(260[this](bool network_active) {261Q_EMIT networkActiveChanged(network_active);262}));263m_event_handlers.emplace_back(m_node.handleNotifyAlertChanged(264[this]() {265qDebug() << "ClientModel: NotifyAlertChanged";266Q_EMIT alertsChanged(getStatusBarWarnings());267}));268m_event_handlers.emplace_back(m_node.handleBannedListChanged(269[this]() {270qDebug() << "ClienModel: Requesting update for peer banlist";271QMetaObject::invokeMethod(banTableModel, [this] { banTableModel->refresh(); });272}));273m_event_handlers.emplace_back(m_node.handleNotifyBlockTip(274[this](SynchronizationState sync_state, interfaces::BlockTip tip, double verification_progress) {275TipChanged(sync_state, tip, verification_progress, SyncType::BLOCK_SYNC);276}));277m_event_handlers.emplace_back(m_node.handleNotifyHeaderTip(278[this](SynchronizationState sync_state, interfaces::BlockTip tip, bool presync) {279TipChanged(sync_state, tip, /*verification_progress=*/0.0, presync ? SyncType::HEADER_PRESYNC : SyncType::HEADER_SYNC);280}));281}283void ClientModel::unsubscribeFromCoreSignals()284{285m_event_handlers.clear();286}288bool ClientModel::getProxyInfo(std::string& ip_port) const289{290const auto ipv4 = m_node.getProxy(NET_IPV4);291const auto ipv6 = m_node.getProxy(NET_IPV6);292if (ipv4 && ipv6) {293ip_port = ipv4->proxy.ToStringAddrPort();294return true;295}296return false;297}
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.