Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void StartShutdown()
}
bool ShutdownRequested()
{
return fRequestShutdown;
return fRequestShutdown || fRestartRequested;
}

class CCoinsViewErrorCatcher : public CCoinsViewBacked
Expand Down Expand Up @@ -149,6 +149,7 @@ static CCoinsViewErrorCatcher *pcoinscatcher = NULL;
/** Preparing steps before shutting down or restarting the wallet */
void PrepareShutdown()
{
fRequestShutdown = true; // Needed when we shutdown the wallet
fRestartRequested = true; // Needed when we restart the wallet
LogPrintf("%s: In progress...\n", __func__);
static CCriticalSection cs_Shutdown;
Expand Down
2 changes: 2 additions & 0 deletions src/masternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ uint256 CMasternode::CalculateScore(int mod, int64_t nBlockHeight)

void CMasternode::Check()
{
if(ShutdownRequested()) return;

//TODO: Random segfault with this line removed
TRY_LOCK(cs_main, lockRecv);
if(!lockRecv) return;
Expand Down
4 changes: 3 additions & 1 deletion src/qt/overviewpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@ void OverviewPage::showOutOfSyncWarning(bool fShow)

void OverviewPage::updateDarksendProgress()
{
if(IsInitialBlockDownload()) return;
if(IsInitialBlockDownload() || ShutdownRequested()) return;

if(!pwalletMain || !walletModel || !walletModel->getOptionsModel()) return;

int64_t nBalance = pwalletMain->GetBalance();
QString strAmountAndRounds;
Expand Down