ipc: Expose an RPC interface over the -ipcbind socket

This allows `bitcoin-cli` to connect to the node via IPC instead TCP to execute
RPC methods in an upcoming commit.
This commit is contained in:
Ryan Ofsky
2025-10-09 12:47:27 -04:00
parent df76891a3b
commit 6a54834895
12 changed files with 95 additions and 1 deletions

View File

@@ -8,6 +8,7 @@
#include <interfaces/init.h>
#include <interfaces/ipc.h>
#include <interfaces/node.h>
#include <interfaces/rpc.h>
#include <interfaces/wallet.h>
#include <node/context.h>
#include <util/check.h>
@@ -33,6 +34,7 @@ public:
return MakeWalletLoader(chain, *Assert(m_node.args));
}
std::unique_ptr<interfaces::Echo> makeEcho() override { return interfaces::MakeEcho(); }
std::unique_ptr<interfaces::Rpc> makeRpc() override { return interfaces::MakeRpc(m_node); }
interfaces::Ipc* ipc() override { return m_ipc.get(); }
// bitcoin-gui accepts -ipcbind option even though it does not use it
// directly. It just returns true here to accept the option because