Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JSKitty committed Jul 1, 2023
1 parent 302f69b commit bf05ccc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1804,12 +1804,19 @@ bool AppInit2(const std::vector<std::string>& words)
LogPrintf("Waiting for genesis block to be imported...\n");
{
std::unique_lock<std::mutex> lockG(cs_GenesisWait);
while (!fHaveGenesis) {
condvar_GenesisWait.wait(lockG);
// We previously could hang here if StartShutdown() is called prior to
// ThreadImport getting started, so instead we just wait on a timer to
// check ShutdownRequested() regularly.
while (!fHaveGenesis && !ShutdownRequested()) {
condvar_GenesisWait.wait_for(lockG, std::chrono::milliseconds(500));
}
uiInterface.NotifyBlockTip.disconnect(BlockNotifyGenesisWait);
}

if (ShutdownRequested()) {
return false;
}

// ********************************************************* Step 10: setup ObfuScation

uiInterface.InitMessage(_("Loading masternode cache..."));
Expand Down

0 comments on commit bf05ccc

Please sign in to comment.