mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-06 21:57:54 +02:00
refactor: reduce #ifdef ENABLE_EXTERNAL_SIGNER usage
In particular this make the node interface independent on whether external signer support is compiled.
This commit is contained in:
@@ -1243,9 +1243,9 @@ void runCommand(const std::string& strCommand)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_EXTERNAL_SIGNER
|
||||
UniValue RunCommandParseJSON(const std::string& str_command, const std::string& str_std_in)
|
||||
{
|
||||
#ifdef ENABLE_EXTERNAL_SIGNER
|
||||
namespace bp = boost::process;
|
||||
|
||||
UniValue result_json;
|
||||
@@ -1277,8 +1277,10 @@ UniValue RunCommandParseJSON(const std::string& str_command, const std::string&
|
||||
if (!result_json.read(result)) throw std::runtime_error("Unable to parse JSON: " + result);
|
||||
|
||||
return result_json;
|
||||
}
|
||||
#else
|
||||
throw std::runtime_error("Compiled without external signing support (required for external signing).");
|
||||
#endif // ENABLE_EXTERNAL_SIGNER
|
||||
}
|
||||
|
||||
void SetupEnvironment()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user