Inside Bitcoin
Opening the selected file…
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.
1// Copyright (c) 2010-present The Bitcoin Core developers2// Distributed under the MIT software license, see the accompanying3// file COPYING or http://www.opensource.org/licenses/mit-license.php.5#include <node/interface_ui.h>7#include <util/btcsignals.h>8#include <util/string.h>9#include <util/translation.h>11using util::MakeUnorderedList;13CClientUIInterface uiInterface;15bool InitError(const bilingual_str& str)16{17uiInterface.ThreadSafeMessageBox(str, CClientUIInterface::MSG_ERROR);18return false;19}21bool InitError(const bilingual_str& str, const std::vector<std::string>& details)22{23// For now just flatten the list of error details into a string to pass to24// the base InitError overload. In the future, if more init code provides25// error details, the details could be passed separately from the main26// message for rich display in the GUI. But currently the only init27// functions which provide error details are ones that run during early init28// before the GUI uiInterface is registered, so there's no point passing29// main messages and details separately to uiInterface yet.30return InitError(details.empty() ? str : str + Untranslated(strprintf(":\n%s", MakeUnorderedList(details))));31}33void InitWarning(const bilingual_str& str)34{35uiInterface.ThreadSafeMessageBox(str, CClientUIInterface::MSG_WARNING);36}