Merge pull request #503 from UdjinM6/v0.12.0.x_ds_fixes

V0.12.0.x ds fixes
This commit is contained in:
evan82 2015-08-10 18:56:51 -07:00
commit a7fa7e28b0
4 changed files with 5 additions and 8 deletions

View File

@ -1356,7 +1356,7 @@ void CDarksendPool::ClearLastMessage()
//
// This does NOT run by default for daemons, only for QT.
//
bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
bool CDarksendPool::DoAutomaticDenominating(bool fDryRun)
{
if(!fEnableDarksend) return false;
if(fMasterNode) return false;
@ -1441,6 +1441,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
if(nBalanceNeedsDenominated > nValueIn) nBalanceNeedsDenominated = nValueIn;
if(nBalanceNeedsDenominated < nLowestDenom) return false; // most likely we just waiting for denoms to confirm
if(!fDryRun) return CreateDenominated(nBalanceNeedsDenominated);
return true;
@ -1607,10 +1608,6 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
}
strAutoDenomResult = _("Mixing in progress...");
if(!ready) return true;
if(sessionDenom == 0) return true;
return false;
}
@ -2244,7 +2241,7 @@ void ThreadCheckDarkSendPool()
darkSendPool.CheckTimeout();
darkSendPool.CheckForCompleteQueue();
if(darkSendPool.GetState() == POOL_STATUS_IDLE && c % 6 == 0){
if(darkSendPool.GetState() == POOL_STATUS_IDLE && c % 15 == 0){
darkSendPool.DoAutomaticDenominating();
}
}

View File

@ -437,7 +437,7 @@ public:
bool IsCompatibleWithSession(int64_t nAmount, CTransaction txCollateral, int &errorID);
/// Passively run Darksend in the background according to the configuration in settings (only for QT)
bool DoAutomaticDenominating(bool fDryRun=false, bool ready=false);
bool DoAutomaticDenominating(bool fDryRun=false);
bool PrepareDarksendDenominate();
/// Check for process in Darksend

View File

@ -251,6 +251,7 @@ void OptionsDialog::on_resetButton_clicked()
void OptionsDialog::on_okButton_clicked()
{
mapper->submit();
darkSendPool.cachedNumBlocks = 0;
pwalletMain->MarkDirty();
accept();
}

View File

@ -545,6 +545,5 @@ void OverviewPage::toggleDarksend(){
dlg.exec();
}
darkSendPool.DoAutomaticDenominating();
}
}