MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / UseMultiprocess

Function UseMultiprocess

src/bitcoin.cpp:151–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151bool UseMultiprocess(const CommandLine& cmd)
152{
153 // If -m or -M options were explicitly specified, there is no need to
154 // further parse arguments to determine which to use.
155 if (cmd.use_multiprocess) return *cmd.use_multiprocess;
156
157 ArgsManager args;
158 args.SetDefaultFlags(ArgsManager::ALLOW_ANY);
159 std::string error_message;
160 auto argv{cmd.args};
161 argv.insert(argv.begin(), nullptr);
162 if (!args.ParseParameters(argv.size(), argv.data(), error_message)) {
163 tfm::format(std::cerr, "Warning: failed to parse subcommand command line options: %s\n", error_message);
164 }
165 if (!args.ReadConfigFiles(error_message, true)) {
166 tfm::format(std::cerr, "Warning: failed to parse subcommand config: %s\n", error_message);
167 }
168 args.SelectConfigNetwork(args.GetChainTypeString());
169
170 // If any -ipc* options are set these need to be processed by a
171 // multiprocess-capable binary.
172 return args.IsArgSet("-ipcbind") || args.IsArgSet("-ipcconnect") || args.IsArgSet("-ipcfd");
173}
174
175//! Execute the specified bitcoind, bitcoin-qt or other command line in `args`
176//! using src, bin and libexec directory paths relative to this executable, where

Callers 1

mainFunction · 0.85

Calls 11

SetDefaultFlagsMethod · 0.80
ParseParametersMethod · 0.80
ReadConfigFilesMethod · 0.80
SelectConfigNetworkMethod · 0.80
IsArgSetMethod · 0.80
formatFunction · 0.70
insertMethod · 0.45
beginMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
GetChainTypeStringMethod · 0.45

Tested by

no test coverage detected