more darkcoin->dash

Closes #690
This commit is contained in:
UdjinM6 2016-01-31 16:23:02 +03:00 committed by Holger Schinzel
parent 826cba78a5
commit bbbbdd8100
13 changed files with 43 additions and 38 deletions

View File

@ -95,7 +95,7 @@ Issue the following:
Make note of the hash (which is your collateral_output) and index. Make note of the hash (which is your collateral_output) and index.
### Enter your Masternode details into your masternode.conf file ### 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. `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.

View File

@ -1409,7 +1409,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun)
// should have some additional amount for them // should have some additional amount for them
nLowestDenom += DARKSEND_COLLATERAL*4; 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 balanceNeedsAnonymized is more than pool max, take the pool max
if(nBalanceNeedsAnonymized > DARKSEND_POOL_MAX) nBalanceNeedsAnonymized = DARKSEND_POOL_MAX; if(nBalanceNeedsAnonymized > DARKSEND_POOL_MAX) nBalanceNeedsAnonymized = DARKSEND_POOL_MAX;

View File

@ -17,13 +17,13 @@ BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex) BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN BEGIN
VALUE "CompanyName", "Dash" 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 "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "dashd" VALUE "InternalName", "dashd"
VALUE "LegalCopyright", COPYRIGHT_STR 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 "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 "OriginalFilename", "dashd.exe"
VALUE "ProductName", "Darkcoind" VALUE "ProductName", "Dashd"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END END
END END

View File

@ -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 += " -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 += " -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 += " -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 += " -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"; strUsage += "\n" + _("InstantX options:") + "\n";
@ -1545,8 +1545,8 @@ bool AppInit2(boost::thread_group& threadGroup)
fDarksendMultiSession = GetBoolArg("-darksendmultisession", fDarksendMultiSession); fDarksendMultiSession = GetBoolArg("-darksendmultisession", fDarksendMultiSession);
nDarksendRounds = GetArg("-darksendrounds", nDarksendRounds); nDarksendRounds = GetArg("-darksendrounds", nDarksendRounds);
nDarksendRounds = std::min(std::max(nDarksendRounds, 1), 99999); nDarksendRounds = std::min(std::max(nDarksendRounds, 1), 99999);
nAnonymizeDarkcoinAmount = GetArg("-anonymizedashamount", nAnonymizeDarkcoinAmount); nAnonymizeDashAmount = GetArg("-anonymizedashamount", nAnonymizeDashAmount);
nAnonymizeDarkcoinAmount = std::min(std::max(nAnonymizeDarkcoinAmount, 2), 999999); nAnonymizeDashAmount = std::min(std::max(nAnonymizeDashAmount, 2), 999999);
fEnableInstantX = GetBoolArg("-enableinstantx", fEnableInstantX); fEnableInstantX = GetBoolArg("-enableinstantx", fEnableInstantX);
nInstantXDepth = GetArg("-instantxdepth", nInstantXDepth); nInstantXDepth = GetArg("-instantxdepth", nInstantXDepth);
@ -1561,7 +1561,7 @@ bool AppInit2(boost::thread_group& threadGroup)
LogPrintf("fLiteMode %d\n", fLiteMode); LogPrintf("fLiteMode %d\n", fLiteMode);
LogPrintf("nInstantXDepth %d\n", nInstantXDepth); LogPrintf("nInstantXDepth %d\n", nInstantXDepth);
LogPrintf("Darksend rounds %d\n", nDarksendRounds); 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()); LogPrintf("Budget Mode %s\n", strBudgetMode.c_str());
darkSendPool.InitDenominations(); darkSendPool.InitDenominations();

View File

@ -84,8 +84,8 @@ void DarksendConfig::configure(bool enabled, int coins, int rounds) {
QSettings settings; QSettings settings;
settings.setValue("nDarksendRounds", rounds); settings.setValue("nDarksendRounds", rounds);
settings.setValue("nAnonymizeDarkcoinAmount", coins); settings.setValue("nAnonymizeDashAmount", coins);
nDarksendRounds = rounds; nDarksendRounds = rounds;
nAnonymizeDarkcoinAmount = coins; nAnonymizeDashAmount = coins;
} }

View File

@ -182,7 +182,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QSpinBox" name="anonymizeDarkcoin"> <widget class="QSpinBox" name="anonymizeDash">
<property name="minimum"> <property name="minimum">
<number>2</number> <number>2</number>
</property> </property>

View File

@ -12,7 +12,7 @@ static const int MODEL_UPDATE_DELAY = 250;
/* AskPassphraseDialog -- Maximum passphrase length */ /* AskPassphraseDialog -- Maximum passphrase length */
static const int MAX_PASSPHRASE_SIZE = 1024; 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; static const int STATUSBAR_ICONSIZE = 16;
/* Invalid field background style */ /* Invalid field background style */

View File

@ -210,7 +210,7 @@ void OptionsDialog::setMapper()
/* Darksend Rounds */ /* Darksend Rounds */
mapper->addMapping(ui->darksendRounds, OptionsModel::DarksendRounds); mapper->addMapping(ui->darksendRounds, OptionsModel::DarksendRounds);
mapper->addMapping(ui->anonymizeDarkcoin, OptionsModel::AnonymizeDarkcoinAmount); mapper->addMapping(ui->anonymizeDash, OptionsModel::AnonymizeDashAmount);
} }

View File

@ -74,11 +74,16 @@ void OptionsModel::Init()
if (!settings.contains("nDarksendRounds")) if (!settings.contains("nDarksendRounds"))
settings.setValue("nDarksendRounds", 2); settings.setValue("nDarksendRounds", 2);
if (!settings.contains("nAnonymizeDashAmount")) {
// for migration from old settings
if (!settings.contains("nAnonymizeDarkcoinAmount")) if (!settings.contains("nAnonymizeDarkcoinAmount"))
settings.setValue("nAnonymizeDarkcoinAmount", 1000); settings.setValue("nAnonymizeDashAmount", 1000);
else
settings.setValue("nAnonymizeDashAmount", settings.value("nAnonymizeDarkcoinAmount"));
}
nDarksendRounds = settings.value("nDarksendRounds").toLongLong(); 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 // These are shared with the core or have a command-line parameter
// and we want command-line parameters to overwrite the GUI settings. // and we want command-line parameters to overwrite the GUI settings.
@ -140,8 +145,8 @@ void OptionsModel::Init()
if (settings.contains("nDarksendRounds")) if (settings.contains("nDarksendRounds"))
SoftSetArg("-darksendrounds", settings.value("nDarksendRounds").toString().toStdString()); SoftSetArg("-darksendrounds", settings.value("nDarksendRounds").toString().toStdString());
if (settings.contains("nAnonymizeDarkcoinAmount")) if (settings.contains("nAnonymizeDashAmount"))
SoftSetArg("-anonymizedashamount", settings.value("nAnonymizeDarkcoinAmount").toString().toStdString()); SoftSetArg("-anonymizedashamount", settings.value("nAnonymizeDashAmount").toString().toStdString());
language = settings.value("language").toString(); language = settings.value("language").toString();
} }
@ -221,8 +226,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
return settings.value("nThreadsScriptVerif"); return settings.value("nThreadsScriptVerif");
case DarksendRounds: case DarksendRounds:
return QVariant(nDarksendRounds); return QVariant(nDarksendRounds);
case AnonymizeDarkcoinAmount: case AnonymizeDashAmount:
return QVariant(nAnonymizeDarkcoinAmount); return QVariant(nAnonymizeDashAmount);
case Listen: case Listen:
return settings.value("fListen"); return settings.value("fListen");
default: default:
@ -329,10 +334,10 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
settings.setValue("nDarksendRounds", nDarksendRounds); settings.setValue("nDarksendRounds", nDarksendRounds);
emit darksendRoundsChanged(nDarksendRounds); emit darksendRoundsChanged(nDarksendRounds);
break; break;
case AnonymizeDarkcoinAmount: case AnonymizeDashAmount:
nAnonymizeDarkcoinAmount = value.toInt(); nAnonymizeDashAmount = value.toInt();
settings.setValue("nAnonymizeDarkcoinAmount", nAnonymizeDarkcoinAmount); settings.setValue("nAnonymizeDashAmount", nAnonymizeDashAmount);
emit anonymizeDarkcoinAmountChanged(nAnonymizeDarkcoinAmount); emit anonymizeDashAmountChanged(nAnonymizeDashAmount);
break; break;
case CoinControlFeatures: case CoinControlFeatures:
fCoinControlFeatures = value.toBool(); fCoinControlFeatures = value.toBool();

View File

@ -44,7 +44,7 @@ public:
DatabaseCache, // int DatabaseCache, // int
SpendZeroConfChange, // bool SpendZeroConfChange, // bool
DarksendRounds, // int DarksendRounds, // int
AnonymizeDarkcoinAmount, //int AnonymizeDashAmount, //int
Listen, // bool Listen, // bool
OptionIDRowCount, OptionIDRowCount,
}; };
@ -89,7 +89,7 @@ private:
signals: signals:
void displayUnitChanged(int unit); void displayUnitChanged(int unit);
void darksendRoundsChanged(int); void darksendRoundsChanged(int);
void anonymizeDarkcoinAmountChanged(int); void anonymizeDashAmountChanged(int);
void coinControlFeaturesChanged(bool); void coinControlFeaturesChanged(bool);
}; };

View File

@ -320,7 +320,7 @@ void OverviewPage::updateDarksendProgress()
if(!pwalletMain) return; if(!pwalletMain) return;
QString strAmountAndRounds; 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) if(currentBalance == 0)
{ {
@ -328,8 +328,8 @@ void OverviewPage::updateDarksendProgress()
ui->darksendProgress->setToolTip(tr("No inputs detected")); ui->darksendProgress->setToolTip(tr("No inputs detected"));
// when balance is zero just show info from settings // when balance is zero just show info from settings
strAnonymizeDarkcoinAmount = strAnonymizeDarkcoinAmount.remove(strAnonymizeDarkcoinAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1); strAnonymizeDashAmount = strAnonymizeDashAmount.remove(strAnonymizeDashAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
strAmountAndRounds = strAnonymizeDarkcoinAmount + " / " + tr("%n Rounds", "", nDarksendRounds); strAmountAndRounds = strAnonymizeDashAmount + " / " + tr("%n Rounds", "", nDarksendRounds);
ui->labelAmountRounds->setToolTip(tr("No inputs detected")); ui->labelAmountRounds->setToolTip(tr("No inputs detected"));
ui->labelAmountRounds->setText(strAmountAndRounds); ui->labelAmountRounds->setText(strAmountAndRounds);
@ -356,20 +356,20 @@ void OverviewPage::updateDarksendProgress()
CAmount nMaxToAnonymize = nAnonymizableBalance + currentAnonymizedBalance + nDenominatedUnconfirmedBalance; CAmount nMaxToAnonymize = nAnonymizableBalance + currentAnonymizedBalance + nDenominatedUnconfirmedBalance;
// If it's more than the anon threshold, limit to that. // 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 == 0) return;
if(nMaxToAnonymize >= nAnonymizeDarkcoinAmount * COIN) { if(nMaxToAnonymize >= nAnonymizeDashAmount * COIN) {
ui->labelAmountRounds->setToolTip(tr("Found enough compatible inputs to anonymize %1") ui->labelAmountRounds->setToolTip(tr("Found enough compatible inputs to anonymize %1")
.arg(strAnonymizeDarkcoinAmount)); .arg(strAnonymizeDashAmount));
strAnonymizeDarkcoinAmount = strAnonymizeDarkcoinAmount.remove(strAnonymizeDarkcoinAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1); strAnonymizeDashAmount = strAnonymizeDashAmount.remove(strAnonymizeDashAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
strAmountAndRounds = strAnonymizeDarkcoinAmount + " / " + tr("%n Rounds", "", nDarksendRounds); strAmountAndRounds = strAnonymizeDashAmount + " / " + tr("%n Rounds", "", nDarksendRounds);
} else { } else {
QString strMaxToAnonymize = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nMaxToAnonymize, false, BitcoinUnits::separatorAlways); 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>" 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") "will anonymize <span style='color:red;'>%2</span> instead")
.arg(strAnonymizeDarkcoinAmount) .arg(strAnonymizeDashAmount)
.arg(strMaxToAnonymize)); .arg(strMaxToAnonymize));
strMaxToAnonymize = strMaxToAnonymize.remove(strMaxToAnonymize.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1); strMaxToAnonymize = strMaxToAnonymize.remove(strMaxToAnonymize.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
strAmountAndRounds = "<span style='color:red;'>" + strAmountAndRounds = "<span style='color:red;'>" +
@ -540,7 +540,7 @@ void OverviewPage::toggleDarksend(){
/* show darksend configuration if client has defaults set */ /* show darksend configuration if client has defaults set */
if(nAnonymizeDarkcoinAmount == 0){ if(nAnonymizeDashAmount == 0){
DarksendConfig dlg(this); DarksendConfig dlg(this);
dlg.setModel(walletModel); dlg.setModel(walletModel);
dlg.exec(); dlg.exec();

View File

@ -111,7 +111,7 @@ bool fLiteMode = false;
bool fEnableInstantX = true; bool fEnableInstantX = true;
int nInstantXDepth = 5; int nInstantXDepth = 5;
int nDarksendRounds = 2; int nDarksendRounds = 2;
int nAnonymizeDarkcoinAmount = 1000; int nAnonymizeDashAmount = 1000;
int nLiquidityProvider = 0; int nLiquidityProvider = 0;
/** Spork enforcement enabled time */ /** Spork enforcement enabled time */
int64_t enforceMasternodePaymentsTime = 4085657524; int64_t enforceMasternodePaymentsTime = 4085657524;

View File

@ -36,7 +36,7 @@ extern bool fLiteMode;
extern bool fEnableInstantX; extern bool fEnableInstantX;
extern int nInstantXDepth; extern int nInstantXDepth;
extern int nDarksendRounds; extern int nDarksendRounds;
extern int nAnonymizeDarkcoinAmount; extern int nAnonymizeDashAmount;
extern int nLiquidityProvider; extern int nLiquidityProvider;
extern bool fEnableDarksend; extern bool fEnableDarksend;
extern bool fDarksendMultiSession; extern bool fDarksendMultiSession;