aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-12-05 15:57:12 -0500
committerRussell Yanofsky <russ@yanofsky.org>2021-04-23 03:02:50 -0500
commitddf7ecc8dfc64cf121099fb047e1ac871de94f4c (patch)
treea0f922fe9b8ffc608a549e5693f1285c9c90c82d /src/interfaces
parent10afdf0280fa93bfffb0a7665c60dc155cd84514 (diff)
downloadbitcoin-ddf7ecc8dfc64cf121099fb047e1ac871de94f4c.tar.xz
multiprocess: Add bitcoin-node process spawning support
Add bitcoin-node startup code to let it spawn and be spawned by other processes
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/init.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/interfaces/init.h b/src/interfaces/init.h
index 8ffd017656..8aea027f01 100644
--- a/src/interfaces/init.h
+++ b/src/interfaces/init.h
@@ -31,6 +31,20 @@ public:
virtual std::unique_ptr<WalletClient> makeWalletClient(Chain& chain);
virtual Ipc* ipc();
};
+
+//! Return implementation of Init interface for the node process. If the argv
+//! indicates that this is a child process spawned to handle requests from a
+//! parent process, this blocks and handles requests, then returns null and a
+//! status code to exit with. If this returns non-null, the caller can start up
+//! normally and use the Init object to spawn and connect to other processes
+//! while it is running.
+std::unique_ptr<Init> MakeNodeInit(NodeContext& node, int argc, char* argv[], int& exit_status);
+
+//! Return implementation of Init interface for the wallet process.
+std::unique_ptr<Init> MakeWalletInit(int argc, char* argv[], int& exit_status);
+
+//! Return implementation of Init interface for the gui process.
+std::unique_ptr<Init> MakeGuiInit(int argc, char* argv[]);
} // namespace interfaces
#endif // BITCOIN_INTERFACES_INIT_H