aboutsummaryrefslogtreecommitdiff
path: root/src/init
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2020-11-24 13:59:33 -0500
committerRussell Yanofsky <russ@yanofsky.org>2021-04-23 03:02:50 -0500
commit84934bf70e11fe4cda1cfda60113a54895d4fdd5 (patch)
treea76e8bd27d3e32a9f433d6f24857d6b96e499efc /src/init
parent7d76cf667eff512043a28d4407cc89f58796c42b (diff)
downloadbitcoin-84934bf70e11fe4cda1cfda60113a54895d4fdd5.tar.xz
multiprocess: Add echoipc RPC method and test
Add simple interfaces::Echo IPC interface with one method that just takes and returns a string, to test multiprocess framework and provide an example of how it can be used to spawn and call between processes.
Diffstat (limited to 'src/init')
-rw-r--r--src/init/bitcoin-node.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/init/bitcoin-node.cpp b/src/init/bitcoin-node.cpp
index b1c8a5b561..49684ede83 100644
--- a/src/init/bitcoin-node.cpp
+++ b/src/init/bitcoin-node.cpp
@@ -2,6 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include <interfaces/echo.h>
#include <interfaces/init.h>
#include <interfaces/ipc.h>
#include <node/context.h>
@@ -21,6 +22,7 @@ public:
{
m_node.init = this;
}
+ std::unique_ptr<interfaces::Echo> makeEcho() override { return interfaces::MakeEcho(); }
interfaces::Ipc* ipc() override { return m_ipc.get(); }
NodeContext& m_node;
std::unique_ptr<interfaces::Ipc> m_ipc;