Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/impl/dgb/coin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

set(dgb_coin_impl
rpc_data.hpp
rpc.hpp
rpc.hpp rpc.cpp
rpc_request.hpp
softfork_check.hpp
p2p_connection.hpp p2p_connection.cpp
p2p_node.cpp p2p_node.hpp
p2p_messages.hpp
Expand Down
15 changes: 11 additions & 4 deletions src/impl/dgb/coin/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,25 @@ class Node : public dgb::interfaces::Node

config_t* m_config = nullptr;

// Real io_context for the M3 NodeRPC transport (mirrors btc node.hpp).
// rpc.hpp brings boost::asio in transitively; no extra include needed.
boost::asio::io_context* m_context = nullptr;

std::unique_ptr<NodeRPC> m_rpc;

public:
Node(auto* /*context*/, auto* config) : m_config(config)
Node(auto* context, auto* config) : m_config(config), m_context(context)
{
}

void run()
{
// Stub NodeRPC: constructed so has-rpc presence wiring can be
// exercised, but no transport connect until M3.
m_rpc = std::make_unique<NodeRPC>(this);
// M3: real NodeRPC transport (external-daemon FALLBACK path that V36
// mandates persist alongside the embedded daemon). Mirrors btc
// node.hpp; testnet drives the chain-identity genesis probe in
// NodeRPC::check(). connect() (transport bring-up) is driven by the
// pool-layer seam once an RPC endpoint is configured.
m_rpc = std::make_unique<NodeRPC>(m_context, this, m_config->m_testnet);
}

NodeRPC* rpc() { return m_rpc.get(); }
Expand Down
Loading