diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2021-11-12 10:06:00 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2022-01-06 22:14:16 -0500 |
commit | 90fc8b089d591cabff60ee829a33f96c37fd27ba (patch) | |
tree | 6858f9c7b95c2af58674a3474a74ac93d4e97ca0 /src/interfaces | |
parent | 4ada74206a533e14312477f36d5443da5caebba0 (diff) |
Add src/node/* code to node:: namespace
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/chain.h | 4 | ||||
-rw-r--r-- | src/interfaces/init.h | 4 | ||||
-rw-r--r-- | src/interfaces/node.h | 10 |
3 files changed, 12 insertions, 6 deletions
diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index 9eb0d680e3..4f5105a5c1 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -28,7 +28,9 @@ enum class RBFTransactionState; struct bilingual_str; struct CBlockLocator; struct FeeCalculation; +namespace node { struct NodeContext; +} // namespace node namespace interfaces { @@ -316,7 +318,7 @@ public: }; //! Return implementation of Chain interface. -std::unique_ptr<Chain> MakeChain(NodeContext& node); +std::unique_ptr<Chain> MakeChain(node::NodeContext& node); } // namespace interfaces diff --git a/src/interfaces/init.h b/src/interfaces/init.h index a4ecf4b5d1..2153076366 100644 --- a/src/interfaces/init.h +++ b/src/interfaces/init.h @@ -7,7 +7,9 @@ #include <memory> +namespace node { struct NodeContext; +} // namespace node namespace interfaces { class Chain; @@ -40,7 +42,7 @@ public: //! status code to exit with. If this returns non-null, the caller can start up //! normally and use the Init object to spawn and connect to other processes //! while it is running. -std::unique_ptr<Init> MakeNodeInit(NodeContext& node, int argc, char* argv[], int& exit_status); +std::unique_ptr<Init> MakeNodeInit(node::NodeContext& node, int argc, char* argv[], int& exit_status); //! Return implementation of Init interface for the wallet process. std::unique_ptr<Init> MakeWalletInit(int argc, char* argv[], int& exit_status); diff --git a/src/interfaces/node.h b/src/interfaces/node.h index 8143839850..9b9b066036 100644 --- a/src/interfaces/node.h +++ b/src/interfaces/node.h @@ -32,8 +32,10 @@ class proxyType; enum class SynchronizationState; enum class TransactionError; struct CNodeStateStats; -struct NodeContext; struct bilingual_str; +namespace node { +struct NodeContext; +} // namespace node namespace interfaces { class Handler; @@ -242,12 +244,12 @@ public: //! Get and set internal node context. Useful for testing, but not //! accessible across processes. - virtual NodeContext* context() { return nullptr; } - virtual void setContext(NodeContext* context) { } + virtual node::NodeContext* context() { return nullptr; } + virtual void setContext(node::NodeContext* context) { } }; //! Return implementation of Node interface. -std::unique_ptr<Node> MakeNode(NodeContext& context); +std::unique_ptr<Node> MakeNode(node::NodeContext& context); //! Block tip (could be a header or not, depends on the subscribed signal). struct BlockTip { |