Fix Sync condition checking in PrivateSend (#1069)

This commit is contained in:
TheLazieR Yip 2016-10-11 04:07:49 +07:00 committed by UdjinM6
parent 321fd64921
commit 9071933bf4

View File

@ -1298,6 +1298,11 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun)
if(!pwalletMain || pwalletMain->IsLocked(true)) return false;
if(nState == POOL_STATE_ERROR || nState == POOL_STATE_SUCCESS) return false;
if(!masternodeSync.IsMasternodeListSynced()) {
strAutoDenomResult = _("Can't mix while sync in progress.");
return false;
}
switch(nWalletBackups) {
case 0:
LogPrint("privatesend", "CDarksendPool::DoAutomaticDenominating -- Automatic backups disabled, no mixing available.\n");
@ -1369,11 +1374,6 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun)
return false;
}
if(!masternodeSync.IsBlockchainSynced()) {
strAutoDenomResult = _("Can't mix while sync in progress.");
return false;
}
if(!fDryRun && pwalletMain->IsLocked(true)) {
strAutoDenomResult = _("Wallet is locked.");
return false;