Skip to content

Commit

Permalink
multiprocess: Expose Chain interface
Browse files Browse the repository at this point in the history
Expose Chain interface to external processes spawning or connecting to
bitcoin-node.
  • Loading branch information
ryanofsky committed Sep 26, 2024
1 parent 34d3e2a commit 395d5ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ipc/capnp/init-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef BITCOIN_IPC_CAPNP_INIT_TYPES_H
#define BITCOIN_IPC_CAPNP_INIT_TYPES_H

#include <ipc/capnp/chain.capnp.proxy-types.h>
#include <ipc/capnp/echo.capnp.proxy-types.h>
#include <ipc/capnp/mining.capnp.proxy-types.h>

Expand Down
3 changes: 3 additions & 0 deletions src/ipc/capnp/init.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@ using Cxx = import "/capnp/c++.capnp";
$Cxx.namespace("ipc::capnp::messages");

using Proxy = import "/mp/proxy.capnp";
$Proxy.include("interfaces/chain.h");
$Proxy.include("interfaces/echo.h");
$Proxy.include("interfaces/init.h");
$Proxy.include("interfaces/mining.h");
$Proxy.includeTypes("ipc/capnp/init-types.h");

using Chain = import "chain.capnp";
using Echo = import "echo.capnp";
using Mining = import "mining.capnp";

interface Init $Proxy.wrap("interfaces::Init") {
construct @0 (threadMap: Proxy.ThreadMap) -> (threadMap :Proxy.ThreadMap);
makeEcho @1 (context :Proxy.Context) -> (result :Echo.Echo);
makeMining @2 (context :Proxy.Context) -> (result :Mining.Mining);
makeChain @3 (context :Proxy.Context) -> (result :Chain.Chain);
}

0 comments on commit 395d5ee

Please sign in to comment.