Check that -blocknotify command is non-empty before executing
To make BlockNotifyCallback(...) (-blocknotify) consistent with: * AlertNotify(...) (-alertnotify) * AddToWallet(...) (-walletnotify)
This commit is contained in:
1 parent
140de14a12
commit
6fb8f5f17c
1 file changed
+2
-1
+2
-1
@@ -547,10 +547,11 @@ static void BlockNotifyCallback(bool initialSync, const CBlockIndex *pBlockIndex
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
std::string strCmd = gArgs.GetArg("-blocknotify", "");
|
std::string strCmd = gArgs.GetArg("-blocknotify", "");
|
||||||
|
if (!strCmd.empty()) {
|
||||||
boost::replace_all(strCmd, "%s", pBlockIndex->GetBlockHash().GetHex());
|
boost::replace_all(strCmd, "%s", pBlockIndex->GetBlockHash().GetHex());
|
||||||
boost::thread t(runCommand, strCmd); // thread runs free
|
boost::thread t(runCommand, strCmd); // thread runs free
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static bool fHaveGenesis = false;
|
static bool fHaveGenesis = false;
|
||||||
static boost::mutex cs_GenesisWait;
|
static boost::mutex cs_GenesisWait;
|
||||||
|
|||||||
Reference in new issue
Block a user