Skip to content

Commit 4d5448c

Browse files
committed
MOVEONLY: Move NodeContext struct to node/context.h
1 parent 301bd41 commit 4d5448c

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

src/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ BITCOIN_CORE_H = \
157157
netmessagemaker.h \
158158
node/coin.h \
159159
node/coinstats.h \
160+
node/context.h \
160161
node/psbt.h \
161162
node/transaction.h \
162163
noui.h \

src/init.h

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,10 @@
77
#define BITCOIN_INIT_H
88

99
#include <memory>
10+
#include <node/context.h>
1011
#include <string>
1112
#include <util/system.h>
1213

13-
namespace interfaces {
14-
class Chain;
15-
class ChainClient;
16-
} // namespace interfaces
17-
18-
//! Pointers to interfaces used during init and destroyed on shutdown.
19-
struct NodeContext
20-
{
21-
std::unique_ptr<interfaces::Chain> chain;
22-
std::vector<std::unique_ptr<interfaces::ChainClient>> chain_clients;
23-
};
24-
2514
namespace boost
2615
{
2716
class thread_group;

src/node/context.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (c) 2019 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_NODE_CONTEXT_H
6+
#define BITCOIN_NODE_CONTEXT_H
7+
8+
#include <memory>
9+
#include <vector>
10+
11+
namespace interfaces {
12+
class Chain;
13+
class ChainClient;
14+
} // namespace interfaces
15+
16+
//! Pointers to interfaces used during init and destroyed on shutdown.
17+
struct NodeContext
18+
{
19+
std::unique_ptr<interfaces::Chain> chain;
20+
std::vector<std::unique_ptr<interfaces::ChainClient>> chain_clients;
21+
};
22+
23+
#endif // BITCOIN_NODE_CONTEXT_H

0 commit comments

Comments
 (0)