[build]: use #if HAVE_SYSTEM instead of defined(HAVE_SYSTEM)
This commit is contained in:
parent
8c69fae944
commit
976b034b13
6 changed files with 9 additions and 9 deletions
|
@ -376,12 +376,12 @@ void SetupServerArgs()
|
||||||
"-allowselfsignedrootcertificates", "-choosedatadir", "-lang=<lang>", "-min", "-resetguisettings", "-rootcertificates=<file>", "-splash", "-uiplatform"};
|
"-allowselfsignedrootcertificates", "-choosedatadir", "-lang=<lang>", "-min", "-resetguisettings", "-rootcertificates=<file>", "-splash", "-uiplatform"};
|
||||||
|
|
||||||
gArgs.AddArg("-version", "Print version and exit", false, OptionsCategory::OPTIONS);
|
gArgs.AddArg("-version", "Print version and exit", false, OptionsCategory::OPTIONS);
|
||||||
#if defined(HAVE_SYSTEM)
|
#if HAVE_SYSTEM
|
||||||
gArgs.AddArg("-alertnotify=<cmd>", "Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)", false, OptionsCategory::OPTIONS);
|
gArgs.AddArg("-alertnotify=<cmd>", "Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)", false, OptionsCategory::OPTIONS);
|
||||||
#endif
|
#endif
|
||||||
gArgs.AddArg("-assumevalid=<hex>", strprintf("If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification (0 to verify all, default: %s, testnet: %s)", defaultChainParams->GetConsensus().defaultAssumeValid.GetHex(), testnetChainParams->GetConsensus().defaultAssumeValid.GetHex()), false, OptionsCategory::OPTIONS);
|
gArgs.AddArg("-assumevalid=<hex>", strprintf("If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification (0 to verify all, default: %s, testnet: %s)", defaultChainParams->GetConsensus().defaultAssumeValid.GetHex(), testnetChainParams->GetConsensus().defaultAssumeValid.GetHex()), false, OptionsCategory::OPTIONS);
|
||||||
gArgs.AddArg("-blocksdir=<dir>", "Specify directory to hold blocks subdirectory for *.dat files (default: <datadir>)", false, OptionsCategory::OPTIONS);
|
gArgs.AddArg("-blocksdir=<dir>", "Specify directory to hold blocks subdirectory for *.dat files (default: <datadir>)", false, OptionsCategory::OPTIONS);
|
||||||
#if defined(HAVE_SYSTEM)
|
#if HAVE_SYSTEM
|
||||||
gArgs.AddArg("-blocknotify=<cmd>", "Execute command when the best block changes (%s in cmd is replaced by block hash)", false, OptionsCategory::OPTIONS);
|
gArgs.AddArg("-blocknotify=<cmd>", "Execute command when the best block changes (%s in cmd is replaced by block hash)", false, OptionsCategory::OPTIONS);
|
||||||
#endif
|
#endif
|
||||||
gArgs.AddArg("-blockreconstructionextratxn=<n>", strprintf("Extra transactions to keep in memory for compact block reconstructions (default: %u)", DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN), false, OptionsCategory::OPTIONS);
|
gArgs.AddArg("-blockreconstructionextratxn=<n>", strprintf("Extra transactions to keep in memory for compact block reconstructions (default: %u)", DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN), false, OptionsCategory::OPTIONS);
|
||||||
|
@ -583,7 +583,7 @@ std::string LicenseInfo()
|
||||||
"\n";
|
"\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_SYSTEM)
|
#if HAVE_SYSTEM
|
||||||
static void BlockNotifyCallback(bool initialSync, const CBlockIndex *pBlockIndex)
|
static void BlockNotifyCallback(bool initialSync, const CBlockIndex *pBlockIndex)
|
||||||
{
|
{
|
||||||
if (initialSync || !pBlockIndex)
|
if (initialSync || !pBlockIndex)
|
||||||
|
@ -1714,7 +1714,7 @@ bool AppInitMain(InitInterfaces& interfaces)
|
||||||
fHaveGenesis = true;
|
fHaveGenesis = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_SYSTEM)
|
#if HAVE_SYSTEM
|
||||||
if (gArgs.IsArgSet("-blocknotify"))
|
if (gArgs.IsArgSet("-blocknotify"))
|
||||||
uiInterface.NotifyBlockTip_connect(BlockNotifyCallback);
|
uiInterface.NotifyBlockTip_connect(BlockNotifyCallback);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1114,7 +1114,7 @@ fs::path GetSpecialFolderPath(int nFolder, bool fCreate)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_SYSTEM)
|
#if HAVE_SYSTEM
|
||||||
void runCommand(const std::string& strCommand)
|
void runCommand(const std::string& strCommand)
|
||||||
{
|
{
|
||||||
if (strCommand.empty()) return;
|
if (strCommand.empty()) return;
|
||||||
|
|
|
@ -89,7 +89,7 @@ fs::path GetConfigFile(const std::string& confPath);
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
fs::path GetSpecialFolderPath(int nFolder, bool fCreate = true);
|
fs::path GetSpecialFolderPath(int nFolder, bool fCreate = true);
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_SYSTEM)
|
#if HAVE_SYSTEM
|
||||||
void runCommand(const std::string& strCommand);
|
void runCommand(const std::string& strCommand);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1050,7 +1050,7 @@ static CBlockIndex *pindexBestForkTip = nullptr, *pindexBestForkBase = nullptr;
|
||||||
static void AlertNotify(const std::string& strMessage)
|
static void AlertNotify(const std::string& strMessage)
|
||||||
{
|
{
|
||||||
uiInterface.NotifyAlertChanged();
|
uiInterface.NotifyAlertChanged();
|
||||||
#if defined(HAVE_SYSTEM)
|
#if HAVE_SYSTEM
|
||||||
std::string strCmd = gArgs.GetArg("-alertnotify", "");
|
std::string strCmd = gArgs.GetArg("-alertnotify", "");
|
||||||
if (strCmd.empty()) return;
|
if (strCmd.empty()) return;
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ void WalletInit::AddWalletOptions() const
|
||||||
gArgs.AddArg("-wallet=<path>", "Specify wallet database path. Can be specified multiple times to load multiple wallets. Path is interpreted relative to <walletdir> if it is not absolute, and will be created if it does not exist (as a directory containing a wallet.dat file and log files). For backwards compatibility this will also accept names of existing data files in <walletdir>.)", false, OptionsCategory::WALLET);
|
gArgs.AddArg("-wallet=<path>", "Specify wallet database path. Can be specified multiple times to load multiple wallets. Path is interpreted relative to <walletdir> if it is not absolute, and will be created if it does not exist (as a directory containing a wallet.dat file and log files). For backwards compatibility this will also accept names of existing data files in <walletdir>.)", false, OptionsCategory::WALLET);
|
||||||
gArgs.AddArg("-walletbroadcast", strprintf("Make the wallet broadcast transactions (default: %u)", DEFAULT_WALLETBROADCAST), false, OptionsCategory::WALLET);
|
gArgs.AddArg("-walletbroadcast", strprintf("Make the wallet broadcast transactions (default: %u)", DEFAULT_WALLETBROADCAST), false, OptionsCategory::WALLET);
|
||||||
gArgs.AddArg("-walletdir=<dir>", "Specify directory to hold wallets (default: <datadir>/wallets if it exists, otherwise <datadir>)", false, OptionsCategory::WALLET);
|
gArgs.AddArg("-walletdir=<dir>", "Specify directory to hold wallets (default: <datadir>/wallets if it exists, otherwise <datadir>)", false, OptionsCategory::WALLET);
|
||||||
#if defined(HAVE_SYSTEM)
|
#if HAVE_SYSTEM
|
||||||
gArgs.AddArg("-walletnotify=<cmd>", "Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)", false, OptionsCategory::WALLET);
|
gArgs.AddArg("-walletnotify=<cmd>", "Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)", false, OptionsCategory::WALLET);
|
||||||
#endif
|
#endif
|
||||||
gArgs.AddArg("-walletrbf", strprintf("Send transactions with full-RBF opt-in enabled (RPC only, default: %u)", DEFAULT_WALLET_RBF), false, OptionsCategory::WALLET);
|
gArgs.AddArg("-walletrbf", strprintf("Send transactions with full-RBF opt-in enabled (RPC only, default: %u)", DEFAULT_WALLET_RBF), false, OptionsCategory::WALLET);
|
||||||
|
|
|
@ -1050,7 +1050,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFlushOnClose)
|
||||||
// Notify UI of new or updated transaction
|
// Notify UI of new or updated transaction
|
||||||
NotifyTransactionChanged(this, hash, fInsertedNew ? CT_NEW : CT_UPDATED);
|
NotifyTransactionChanged(this, hash, fInsertedNew ? CT_NEW : CT_UPDATED);
|
||||||
|
|
||||||
#if defined(HAVE_SYSTEM)
|
#if HAVE_SYSTEM
|
||||||
// notify an external script when a wallet transaction comes in or is updated
|
// notify an external script when a wallet transaction comes in or is updated
|
||||||
std::string strCmd = gArgs.GetArg("-walletnotify", "");
|
std::string strCmd = gArgs.GetArg("-walletnotify", "");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue