mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 15:39:05 +01:00
MOVEONLY: Move NodeContext struct to node/context.h
This commit is contained in:
@@ -157,6 +157,7 @@ BITCOIN_CORE_H = \
|
|||||||
netmessagemaker.h \
|
netmessagemaker.h \
|
||||||
node/coin.h \
|
node/coin.h \
|
||||||
node/coinstats.h \
|
node/coinstats.h \
|
||||||
|
node/context.h \
|
||||||
node/psbt.h \
|
node/psbt.h \
|
||||||
node/transaction.h \
|
node/transaction.h \
|
||||||
noui.h \
|
noui.h \
|
||||||
|
|||||||
13
src/init.h
13
src/init.h
@@ -7,21 +7,10 @@
|
|||||||
#define BITCOIN_INIT_H
|
#define BITCOIN_INIT_H
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <node/context.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <util/system.h>
|
#include <util/system.h>
|
||||||
|
|
||||||
namespace interfaces {
|
|
||||||
class Chain;
|
|
||||||
class ChainClient;
|
|
||||||
} // namespace interfaces
|
|
||||||
|
|
||||||
//! Pointers to interfaces used during init and destroyed on shutdown.
|
|
||||||
struct NodeContext
|
|
||||||
{
|
|
||||||
std::unique_ptr<interfaces::Chain> chain;
|
|
||||||
std::vector<std::unique_ptr<interfaces::ChainClient>> chain_clients;
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
class thread_group;
|
class thread_group;
|
||||||
|
|||||||
23
src/node/context.h
Normal file
23
src/node/context.h
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
// Copyright (c) 2019 The Bitcoin Core developers
|
||||||
|
// Distributed under the MIT software license, see the accompanying
|
||||||
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
|
#ifndef BITCOIN_NODE_CONTEXT_H
|
||||||
|
#define BITCOIN_NODE_CONTEXT_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
namespace interfaces {
|
||||||
|
class Chain;
|
||||||
|
class ChainClient;
|
||||||
|
} // namespace interfaces
|
||||||
|
|
||||||
|
//! Pointers to interfaces used during init and destroyed on shutdown.
|
||||||
|
struct NodeContext
|
||||||
|
{
|
||||||
|
std::unique_ptr<interfaces::Chain> chain;
|
||||||
|
std::vector<std::unique_ptr<interfaces::ChainClient>> chain_clients;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BITCOIN_NODE_CONTEXT_H
|
||||||
Reference in New Issue
Block a user