mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
fixed locking issue and added lower limit
This commit is contained in:
parent
413b7b44d9
commit
0a75b816e3
@ -1364,7 +1364,7 @@ bool CDarkSendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
|
||||
|
||||
int64 balanceNeedsAnonymized = pwalletMain->GetBalance() - pwalletMain->GetAnonymizedBalance();
|
||||
if(balanceNeedsAnonymized > maxAmount*COIN) balanceNeedsAnonymized= maxAmount*COIN;
|
||||
if(balanceNeedsAnonymized < COIN*1.1){
|
||||
if(balanceNeedsAnonymized < COIN*2.5){
|
||||
LogPrintf("DoAutomaticDenominating : No funds detected in need of denominating \n");
|
||||
return false;
|
||||
}
|
||||
|
@ -385,6 +385,15 @@ void OverviewPage::runDoAutomaticDenomination(){
|
||||
}
|
||||
|
||||
void OverviewPage::toggleDarksend(){
|
||||
int64 balance = pwalletMain->GetBalance();
|
||||
if(balance < 2.5*coin){
|
||||
QMessageBox::warning(this, tr("Darksend"),
|
||||
tr("Darksend requires at least 2.5 DRK to use."),
|
||||
QMessageBox::Ok, QMessageBox::O
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
darkSendPool.cachedNumBlocks = 0;
|
||||
|
||||
fEnableDarksend = !fEnableDarksend;
|
||||
|
@ -1784,9 +1784,6 @@ bool CWallet::CreateCollateralTransaction(CTransaction& txCollateral, std::strin
|
||||
|
||||
if (!SelectCoinsCollateral(vCoinsCollateral, nValueIn2))
|
||||
{
|
||||
BOOST_FOREACH(CTxIn v, vCoinsCollateral)
|
||||
UnlockCoin(v.prevout);
|
||||
|
||||
strReason = "Error: Darksend requires a collateral transaction and could not locate an acceptable input!";
|
||||
return false;
|
||||
}
|
||||
@ -1819,9 +1816,6 @@ bool CWallet::CreateCollateralTransaction(CTransaction& txCollateral, std::strin
|
||||
vinNumber++;
|
||||
}
|
||||
|
||||
BOOST_FOREACH(CTxIn v, vCoinsCollateral)
|
||||
LockCoin(v.prevout);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user