Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CoinControl should disable DS when non-anonymized inputs are selected #337

Merged
merged 1 commit into from
May 20, 2015
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
11 changes: 10 additions & 1 deletion src/qt/coincontroldialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,17 @@ void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column)
coinControl->UnSelect(outpt);
else if (item->isDisabled()) // locked (this happens if "check all" through parent node)
item->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked);
else
else {
coinControl->Select(outpt);
CTxIn vin(outpt);
int rounds = GetInputDarksendRounds(vin);
if(coinControl->useDarkSend && rounds < nDarksendRounds) {
QMessageBox::warning(this, windowTitle(),
tr("Non-anonymized input selected. <b>Darksend will be disabled.</b><br><br>If you still want to use Darksend, please deselect all non-nonymized inputs first and then check Darksend checkbox again."),
QMessageBox::Ok, QMessageBox::Ok);
coinControl->useDarkSend = false;
}
}

// selection changed -> update labels
if (ui->treeWidget->isEnabled()) // do not update on every click for (un)select all
Expand Down
2 changes: 2 additions & 0 deletions src/qt/sendcoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,8 @@ void SendCoinsDialog::coinControlUpdateLabels()
CoinControlDialog::payAmounts.append(entry->getValue().amount);
}

ui->checkUseDarksend->setChecked(CoinControlDialog::coinControl->useDarkSend);

if (CoinControlDialog::coinControl->HasSelected())
{
// actual coin control calculation
Expand Down