File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,7 @@ BITCOIN_CORE_H = \
172172 interfaces/wallet.h \
173173 kernel/chainstatemanager_opts.h \
174174 kernel/coinstats.h \
175+ kernel/context.h \
175176 key.h \
176177 key_io.h \
177178 logging.h \
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2022 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_KERNEL_CONTEXT_H
6+ #define BITCOIN_KERNEL_CONTEXT_H
7+
8+ namespace kernel {
9+ // ! Context struct holding the kernel library's logically global state, and
10+ // ! passed to external libbitcoin_kernel functions which need access to this
11+ // ! state. The kernel libary API is a work in progress, so state organization
12+ // ! and member list will evolve over time.
13+ // !
14+ // ! State stored directly in this struct should be simple. More complex state
15+ // ! should be stored to std::unique_ptr members pointing to opaque types.
16+ struct Context {
17+ };
18+ } // namespace kernel
19+
20+ #endif // BITCOIN_KERNEL_CONTEXT_H
Original file line number Diff line number Diff line change 55#ifndef BITCOIN_NODE_CONTEXT_H
66#define BITCOIN_NODE_CONTEXT_H
77
8+ #include < kernel/context.h>
9+
810#include < cassert>
911#include < functional>
1012#include < memory>
@@ -39,6 +41,8 @@ namespace node {
3941// ! any member functions. It should just be a collection of references that can
4042// ! be used without pulling in unwanted dependencies or functionality.
4143struct NodeContext {
44+ // ! libbitcoin_kernel context
45+ std::unique_ptr<kernel::Context> kernel;
4246 // ! Init interface for initializing current process and connecting to other processes.
4347 interfaces::Init* init{nullptr };
4448 std::unique_ptr<AddrMan> addrman;
You can’t perform that action at this time.
0 commit comments