mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge #16366: init: Use InitError for all errors in bitcoind/qt
fa6f402bdeCall node->initError instead of InitError from GUI code (Russell Yanofsky)fad2502240init: Use InitError for all errors in bitcoind/qt (MarcoFalke) Pull request description: Using the same InitError for startup error in the daemon and the gui makes it possible to run the tests with the gui again: ```sh BITCOIND=bitcoin-qt ./test/functional/test_runner.py feature_includeconf feature_config_args ACKs for top commit: hebasto: ACKfa6f402bderyanofsky: utACKfa6f402bde. Only changes since last review are removing more includes and adding Node::initError method to avoid accessing node `InitError` function and global variables from GUI code. Tree-SHA512: bd19e08dcea4019dfe40356bc5c63cb583cefed54b6c9dcfb82f1b5b00308d8e2b363549afcaea5e93bf83864dbe0917400c3b70f43a8a5bdff45c9cd34cc294
This commit is contained in:
@@ -54,6 +54,7 @@ class NodeImpl : public Node
|
||||
{
|
||||
public:
|
||||
NodeImpl() { m_interfaces.chain = MakeChain(); }
|
||||
void initError(const std::string& message) override { InitError(message); }
|
||||
bool parseParameters(int argc, const char* const argv[], std::string& error) override
|
||||
{
|
||||
return gArgs.ParseParameters(argc, argv, error);
|
||||
|
||||
@@ -38,6 +38,9 @@ class Node
|
||||
public:
|
||||
virtual ~Node() {}
|
||||
|
||||
//! Send init error.
|
||||
virtual void initError(const std::string& message) = 0;
|
||||
|
||||
//! Set command line arguments.
|
||||
virtual bool parseParameters(int argc, const char* const argv[], std::string& error) = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user