Skip to content

more darkcoin->dash #690

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

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion doc/guide-startmany.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Issue the following:
Make note of the hash (which is your collateral_output) and index.

### Enter your Masternode details into your masternode.conf file
[From the dash github repo](https://github.com/darkcoin/darkcoin/blob/master/doc/masternode_conf.md)
[From the dash github repo](https://github.com/dashpay/dash/blob/master/doc/masternode_conf.md)

`masternode.conf` format is a space seperated text file. Each line consisting of an alias, IP address followed by port, masternode private key, collateral output transaction id and collateral output index.

Expand Down
2 changes: 1 addition & 1 deletion src/darksend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun)
// should have some additional amount for them
nLowestDenom += DARKSEND_COLLATERAL*4;

CAmount nBalanceNeedsAnonymized = nAnonymizeDarkcoinAmount*COIN - pwalletMain->GetAnonymizedBalance();
CAmount nBalanceNeedsAnonymized = nAnonymizeDashAmount*COIN - pwalletMain->GetAnonymizedBalance();

// if balanceNeedsAnonymized is more than pool max, take the pool max
if(nBalanceNeedsAnonymized > DARKSEND_POOL_MAX) nBalanceNeedsAnonymized = DARKSEND_POOL_MAX;
Expand Down
4 changes: 2 additions & 2 deletions src/dashd-res.rc
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Dash"
VALUE "FileDescription", "Darkcoind (OSS daemon/client for Dash)"
VALUE "FileDescription", "Dashd (OSS daemon/client for Dash)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "dashd"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "dashd.exe"
VALUE "ProductName", "Darkcoind"
VALUE "ProductName", "Dashd"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END
Expand Down
8 changes: 4 additions & 4 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += " -enabledarksend=<n> " + strprintf(_("Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)"), fEnableDarksend) + "\n";
strUsage += " -darksendmultisession=<n> " + strprintf(_("Enable multiple darksend mixing sessions per block, experimental (0-1, default: %u)"), fDarksendMultiSession) + "\n";
strUsage += " -darksendrounds=<n> " + strprintf(_("Use N separate masternodes to anonymize funds (2-8, default: %u)"), nDarksendRounds) + "\n";
strUsage += " -anonymizedashamount=<n> " + strprintf(_("Keep N DASH anonymized (default: %u)"), nAnonymizeDarkcoinAmount) + "\n";
strUsage += " -anonymizedashamount=<n> " + strprintf(_("Keep N DASH anonymized (default: %u)"), nAnonymizeDashAmount) + "\n";
strUsage += " -liquidityprovider=<n> " + strprintf(_("Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)"), nLiquidityProvider) + "\n";

strUsage += "\n" + _("InstantX options:") + "\n";
Expand Down Expand Up @@ -1545,8 +1545,8 @@ bool AppInit2(boost::thread_group& threadGroup)
fDarksendMultiSession = GetBoolArg("-darksendmultisession", fDarksendMultiSession);
nDarksendRounds = GetArg("-darksendrounds", nDarksendRounds);
nDarksendRounds = std::min(std::max(nDarksendRounds, 1), 99999);
nAnonymizeDarkcoinAmount = GetArg("-anonymizedashamount", nAnonymizeDarkcoinAmount);
nAnonymizeDarkcoinAmount = std::min(std::max(nAnonymizeDarkcoinAmount, 2), 999999);
nAnonymizeDashAmount = GetArg("-anonymizedashamount", nAnonymizeDashAmount);
nAnonymizeDashAmount = std::min(std::max(nAnonymizeDashAmount, 2), 999999);

fEnableInstantX = GetBoolArg("-enableinstantx", fEnableInstantX);
nInstantXDepth = GetArg("-instantxdepth", nInstantXDepth);
Expand All @@ -1561,7 +1561,7 @@ bool AppInit2(boost::thread_group& threadGroup)
LogPrintf("fLiteMode %d\n", fLiteMode);
LogPrintf("nInstantXDepth %d\n", nInstantXDepth);
LogPrintf("Darksend rounds %d\n", nDarksendRounds);
LogPrintf("Anonymize Dash Amount %d\n", nAnonymizeDarkcoinAmount);
LogPrintf("Anonymize Dash Amount %d\n", nAnonymizeDashAmount);
LogPrintf("Budget Mode %s\n", strBudgetMode.c_str());

darkSendPool.InitDenominations();
Expand Down
4 changes: 2 additions & 2 deletions src/qt/darksendconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ void DarksendConfig::configure(bool enabled, int coins, int rounds) {
QSettings settings;

settings.setValue("nDarksendRounds", rounds);
settings.setValue("nAnonymizeDarkcoinAmount", coins);
settings.setValue("nAnonymizeDashAmount", coins);

nDarksendRounds = rounds;
nAnonymizeDarkcoinAmount = coins;
nAnonymizeDashAmount = coins;
}
2 changes: 1 addition & 1 deletion src/qt/forms/optionsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
</widget>
</item>
<item>
<widget class="QSpinBox" name="anonymizeDarkcoin">
<widget class="QSpinBox" name="anonymizeDash">
<property name="minimum">
<number>2</number>
</property>
Expand Down
2 changes: 1 addition & 1 deletion src/qt/guiconstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ static const int MODEL_UPDATE_DELAY = 250;
/* AskPassphraseDialog -- Maximum passphrase length */
static const int MAX_PASSPHRASE_SIZE = 1024;

/* DarkcoinGUI -- Size of icons in status bar */
/* DashGUI -- Size of icons in status bar */
static const int STATUSBAR_ICONSIZE = 16;

/* Invalid field background style */
Expand Down
2 changes: 1 addition & 1 deletion src/qt/optionsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void OptionsDialog::setMapper()

/* Darksend Rounds */
mapper->addMapping(ui->darksendRounds, OptionsModel::DarksendRounds);
mapper->addMapping(ui->anonymizeDarkcoin, OptionsModel::AnonymizeDarkcoinAmount);
mapper->addMapping(ui->anonymizeDash, OptionsModel::AnonymizeDashAmount);

}

Expand Down
27 changes: 16 additions & 11 deletions src/qt/optionsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,16 @@ void OptionsModel::Init()
if (!settings.contains("nDarksendRounds"))
settings.setValue("nDarksendRounds", 2);

if (!settings.contains("nAnonymizeDarkcoinAmount"))
settings.setValue("nAnonymizeDarkcoinAmount", 1000);
if (!settings.contains("nAnonymizeDashAmount")) {
// for migration from old settings
if (!settings.contains("nAnonymizeDarkcoinAmount"))
settings.setValue("nAnonymizeDashAmount", 1000);
else
settings.setValue("nAnonymizeDashAmount", settings.value("nAnonymizeDarkcoinAmount"));
}

nDarksendRounds = settings.value("nDarksendRounds").toLongLong();
nAnonymizeDarkcoinAmount = settings.value("nAnonymizeDarkcoinAmount").toLongLong();
nAnonymizeDashAmount = settings.value("nAnonymizeDashAmount").toLongLong();

// These are shared with the core or have a command-line parameter
// and we want command-line parameters to overwrite the GUI settings.
Expand Down Expand Up @@ -140,8 +145,8 @@ void OptionsModel::Init()

if (settings.contains("nDarksendRounds"))
SoftSetArg("-darksendrounds", settings.value("nDarksendRounds").toString().toStdString());
if (settings.contains("nAnonymizeDarkcoinAmount"))
SoftSetArg("-anonymizedashamount", settings.value("nAnonymizeDarkcoinAmount").toString().toStdString());
if (settings.contains("nAnonymizeDashAmount"))
SoftSetArg("-anonymizedashamount", settings.value("nAnonymizeDashAmount").toString().toStdString());

language = settings.value("language").toString();
}
Expand Down Expand Up @@ -221,8 +226,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
return settings.value("nThreadsScriptVerif");
case DarksendRounds:
return QVariant(nDarksendRounds);
case AnonymizeDarkcoinAmount:
return QVariant(nAnonymizeDarkcoinAmount);
case AnonymizeDashAmount:
return QVariant(nAnonymizeDashAmount);
case Listen:
return settings.value("fListen");
default:
Expand Down Expand Up @@ -329,10 +334,10 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
settings.setValue("nDarksendRounds", nDarksendRounds);
emit darksendRoundsChanged(nDarksendRounds);
break;
case AnonymizeDarkcoinAmount:
nAnonymizeDarkcoinAmount = value.toInt();
settings.setValue("nAnonymizeDarkcoinAmount", nAnonymizeDarkcoinAmount);
emit anonymizeDarkcoinAmountChanged(nAnonymizeDarkcoinAmount);
case AnonymizeDashAmount:
nAnonymizeDashAmount = value.toInt();
settings.setValue("nAnonymizeDashAmount", nAnonymizeDashAmount);
emit anonymizeDashAmountChanged(nAnonymizeDashAmount);
break;
case CoinControlFeatures:
fCoinControlFeatures = value.toBool();
Expand Down
4 changes: 2 additions & 2 deletions src/qt/optionsmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class OptionsModel : public QAbstractListModel
DatabaseCache, // int
SpendZeroConfChange, // bool
DarksendRounds, // int
AnonymizeDarkcoinAmount, //int
AnonymizeDashAmount, //int
Listen, // bool
OptionIDRowCount,
};
Expand Down Expand Up @@ -89,7 +89,7 @@ class OptionsModel : public QAbstractListModel
signals:
void displayUnitChanged(int unit);
void darksendRoundsChanged(int);
void anonymizeDarkcoinAmountChanged(int);
void anonymizeDashAmountChanged(int);
void coinControlFeaturesChanged(bool);
};

Expand Down
20 changes: 10 additions & 10 deletions src/qt/overviewpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,16 +320,16 @@ void OverviewPage::updateDarksendProgress()
if(!pwalletMain) return;

QString strAmountAndRounds;
QString strAnonymizeDarkcoinAmount = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nAnonymizeDarkcoinAmount * COIN, false, BitcoinUnits::separatorAlways);
QString strAnonymizeDashAmount = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nAnonymizeDashAmount * COIN, false, BitcoinUnits::separatorAlways);

if(currentBalance == 0)
{
ui->darksendProgress->setValue(0);
ui->darksendProgress->setToolTip(tr("No inputs detected"));

// when balance is zero just show info from settings
strAnonymizeDarkcoinAmount = strAnonymizeDarkcoinAmount.remove(strAnonymizeDarkcoinAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
strAmountAndRounds = strAnonymizeDarkcoinAmount + " / " + tr("%n Rounds", "", nDarksendRounds);
strAnonymizeDashAmount = strAnonymizeDashAmount.remove(strAnonymizeDashAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
strAmountAndRounds = strAnonymizeDashAmount + " / " + tr("%n Rounds", "", nDarksendRounds);

ui->labelAmountRounds->setToolTip(tr("No inputs detected"));
ui->labelAmountRounds->setText(strAmountAndRounds);
Expand All @@ -356,20 +356,20 @@ void OverviewPage::updateDarksendProgress()
CAmount nMaxToAnonymize = nAnonymizableBalance + currentAnonymizedBalance + nDenominatedUnconfirmedBalance;

// If it's more than the anon threshold, limit to that.
if(nMaxToAnonymize > nAnonymizeDarkcoinAmount*COIN) nMaxToAnonymize = nAnonymizeDarkcoinAmount*COIN;
if(nMaxToAnonymize > nAnonymizeDashAmount*COIN) nMaxToAnonymize = nAnonymizeDashAmount*COIN;

if(nMaxToAnonymize == 0) return;

if(nMaxToAnonymize >= nAnonymizeDarkcoinAmount * COIN) {
if(nMaxToAnonymize >= nAnonymizeDashAmount * COIN) {
ui->labelAmountRounds->setToolTip(tr("Found enough compatible inputs to anonymize %1")
.arg(strAnonymizeDarkcoinAmount));
strAnonymizeDarkcoinAmount = strAnonymizeDarkcoinAmount.remove(strAnonymizeDarkcoinAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
strAmountAndRounds = strAnonymizeDarkcoinAmount + " / " + tr("%n Rounds", "", nDarksendRounds);
.arg(strAnonymizeDashAmount));
strAnonymizeDashAmount = strAnonymizeDashAmount.remove(strAnonymizeDashAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
strAmountAndRounds = strAnonymizeDashAmount + " / " + tr("%n Rounds", "", nDarksendRounds);
} else {
QString strMaxToAnonymize = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nMaxToAnonymize, false, BitcoinUnits::separatorAlways);
ui->labelAmountRounds->setToolTip(tr("Not enough compatible inputs to anonymize <span style='color:red;'>%1</span>,<br>"
"will anonymize <span style='color:red;'>%2</span> instead")
.arg(strAnonymizeDarkcoinAmount)
.arg(strAnonymizeDashAmount)
.arg(strMaxToAnonymize));
strMaxToAnonymize = strMaxToAnonymize.remove(strMaxToAnonymize.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
strAmountAndRounds = "<span style='color:red;'>" +
Expand Down Expand Up @@ -540,7 +540,7 @@ void OverviewPage::toggleDarksend(){

/* show darksend configuration if client has defaults set */

if(nAnonymizeDarkcoinAmount == 0){
if(nAnonymizeDashAmount == 0){
DarksendConfig dlg(this);
dlg.setModel(walletModel);
dlg.exec();
Expand Down
2 changes: 1 addition & 1 deletion src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ bool fLiteMode = false;
bool fEnableInstantX = true;
int nInstantXDepth = 5;
int nDarksendRounds = 2;
int nAnonymizeDarkcoinAmount = 1000;
int nAnonymizeDashAmount = 1000;
int nLiquidityProvider = 0;
/** Spork enforcement enabled time */
int64_t enforceMasternodePaymentsTime = 4085657524;
Expand Down
2 changes: 1 addition & 1 deletion src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extern bool fLiteMode;
extern bool fEnableInstantX;
extern int nInstantXDepth;
extern int nDarksendRounds;
extern int nAnonymizeDarkcoinAmount;
extern int nAnonymizeDashAmount;
extern int nLiquidityProvider;
extern bool fEnableDarksend;
extern bool fDarksendMultiSession;
Expand Down