MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / BlockNotifyCallback

Function BlockNotifyCallback

src/init.cpp:552–563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550}
551
552static void BlockNotifyCallback(bool initialSync, const CBlockIndex *pBlockIndex)
553{
554 if (initialSync || !pBlockIndex)
555 return;
556
557 std::string strCmd = gArgs.GetArg("-blocknotify", "");
558 if (!strCmd.empty()) {
559 boost::replace_all(strCmd, "%s", pBlockIndex->GetBlockHash().GetHex());
560 std::thread t(runCommand, strCmd);
561 t.detach(); // thread runs free
562 }
563}
564
565static bool fHaveGenesis = false;
566static CWaitableCriticalSection cs_GenesisWait;

Callers

nothing calls this directly

Calls 4

GetArgMethod · 0.45
emptyMethod · 0.45
GetHexMethod · 0.45
GetBlockHashMethod · 0.45

Tested by

no test coverage detected