Bitcoin Core  22.99.0
P2P Digital Currency
initexecutor.h
Go to the documentation of this file.
1 // Copyright (c) 2014-2021 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_QT_INITEXECUTOR_H
6 #define BITCOIN_QT_INITEXECUTOR_H
7 
8 #include <interfaces/node.h>
9 
10 #include <exception>
11 
12 #include <QObject>
13 #include <QThread>
14 
15 QT_BEGIN_NAMESPACE
16 class QString;
17 QT_END_NAMESPACE
18 
22 class InitExecutor : public QObject
23 {
24  Q_OBJECT
25 public:
27  ~InitExecutor();
28 
29 public Q_SLOTS:
30  void initialize();
31  void shutdown();
32 
33 Q_SIGNALS:
34  void initializeResult(bool success, interfaces::BlockAndHeaderTipInfo tip_info);
35  void shutdownResult();
36  void runawayException(const QString& message);
37 
38 private:
40  void handleRunawayException(const std::exception* e);
41 
43  QThread m_thread;
44 };
45 
46 #endif // BITCOIN_QT_INITEXECUTOR_H
InitExecutor::~InitExecutor
~InitExecutor()
Definition: initexecutor.cpp:25
InitExecutor::shutdown
void shutdown()
Definition: initexecutor.cpp:54
InitExecutor::m_node
interfaces::Node & m_node
Definition: initexecutor.h:42
InitExecutor::runawayException
void runawayException(const QString &message)
interfaces::BlockAndHeaderTipInfo
Block and header tip information.
Definition: node.h:44
InitExecutor
Class encapsulating Bitcoin Core startup and shutdown.
Definition: initexecutor.h:22
InitExecutor::shutdownResult
void shutdownResult()
node.h
InitExecutor::m_thread
QThread m_thread
Definition: initexecutor.h:43
InitExecutor::initialize
void initialize()
Definition: initexecutor.cpp:39
interfaces::Node
Top-level interface for a bitcoin node (bitcoind process).
Definition: node.h:54
InitExecutor::InitExecutor
InitExecutor(interfaces::Node &node)
Definition: initexecutor.cpp:18
node
Definition: interfaces.cpp:68
InitExecutor::handleRunawayException
void handleRunawayException(const std::exception *e)
Pass fatal exception message to UI thread.
Definition: initexecutor.cpp:33
InitExecutor::initializeResult
void initializeResult(bool success, interfaces::BlockAndHeaderTipInfo tip_info)