mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
init params:
- use defaults in cmd line args/help - make liquidity provider param interaction more verbose - allow to override UI restrictions (rounds/amount) from cmd line
This commit is contained in:
parent
6df51c97d0
commit
4049946625
50
src/init.cpp
50
src/init.cpp
@ -418,14 +418,14 @@ std::string HelpMessage(HelpMessageMode mode)
|
||||
strUsage += " -budgetvotemode=<mode> " + _("Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)") + "\n";
|
||||
|
||||
strUsage += "\n" + _("Darksend options:") + "\n";
|
||||
strUsage += " -enabledarksend=<n> " + strprintf(_("Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)"), 0) + "\n";
|
||||
strUsage += " -darksendmultisession=<n> " + strprintf(_("Enable multiple darksend mixing sessions per block, experimental (0-1, default: %u)"), 0) + "\n";
|
||||
strUsage += " -darksendrounds=<n> " + strprintf(_("Use N separate masternodes to anonymize funds (2-8, default: %u)"), 2) + "\n";
|
||||
strUsage += " -anonymizedashamount=<n> " + strprintf(_("Keep N DASH anonymized (default: %u)"), 0) + "\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)"), 0) + "\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 += " -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 += " -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 += " -enableinstantx=<n> " + strprintf(_("Enable instantx, show confirmations for locked transactions (bool, default: %s)"), "true") + "\n";
|
||||
strUsage += " -enableinstantx=<n> " + strprintf(_("Enable instantx, show confirmations for locked transactions (0-1, default: %u)"), fEnableInstantX) + "\n";
|
||||
strUsage += " -instantxdepth=<n> " + strprintf(_("Show N confirmations for a successfully locked transaction (0-9999, default: %u)"), nInstantXDepth) + "\n";
|
||||
|
||||
strUsage += "\n" + _("Node relay options:") + "\n";
|
||||
@ -704,6 +704,18 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
LogPrintf("AppInit2 : parameter interaction: -enableinstantx=false -> setting -nInstantXDepth=0\n");
|
||||
}
|
||||
|
||||
if (GetArg("-liquidityprovider", 0) > 0) {
|
||||
int nLiqProvTmp = GetArg("-liquidityprovider", 0);
|
||||
mapArgs["-enabledarksend"] = "1";
|
||||
LogPrintf("AppInit2 : parameter interaction: -liquidityprovider=%d -> setting -enabledarksend=1\n", nLiqProvTmp);
|
||||
mapArgs["-darksendrounds"] = "99999";
|
||||
LogPrintf("AppInit2 : parameter interaction: -liquidityprovider=%d -> setting -darksendrounds=99999\n", nLiqProvTmp);
|
||||
mapArgs["-anonymizedashamount"] = "999999";
|
||||
LogPrintf("AppInit2 : parameter interaction: -liquidityprovider=%d -> setting -anonymizedashamount=999999\n", nLiqProvTmp);
|
||||
mapArgs["-darksendmultisession"] = "0";
|
||||
LogPrintf("AppInit2 : parameter interaction: -liquidityprovider=%d -> setting -darksendmultisession=0\n", nLiqProvTmp);
|
||||
}
|
||||
|
||||
// Make sure enough file descriptors are available
|
||||
int nBind = std::max((int)mapArgs.count("-bind") + (int)mapArgs.count("-whitebind"), 1);
|
||||
nMaxConnections = GetArg("-maxconnections", 125);
|
||||
@ -1521,24 +1533,16 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
}
|
||||
}
|
||||
|
||||
fEnableDarksend = GetBoolArg("-enabledarksend", false);
|
||||
fDarksendMultiSession = GetBoolArg("-darksendmultisession", false);
|
||||
nLiquidityProvider = GetArg("-liquidityprovider", nLiquidityProvider);
|
||||
nLiquidityProvider = std::min(std::max(nLiquidityProvider, 0), 100);
|
||||
darkSendPool.SetMinBlockSpacing(nLiquidityProvider * 15);
|
||||
|
||||
nDarksendRounds = GetArg("-darksendrounds", 2);
|
||||
if(nDarksendRounds > 16) nDarksendRounds = 16;
|
||||
if(nDarksendRounds < 1) nDarksendRounds = 1;
|
||||
|
||||
nLiquidityProvider = GetArg("-liquidityprovider", 0); //0-100
|
||||
if(nLiquidityProvider != 0) {
|
||||
darkSendPool.SetMinBlockSpacing(std::min(nLiquidityProvider,100)*15);
|
||||
fEnableDarksend = true;
|
||||
nDarksendRounds = 99999;
|
||||
fDarksendMultiSession = false;
|
||||
}
|
||||
|
||||
nAnonymizeDarkcoinAmount = GetArg("-anonymizedashamount", 0);
|
||||
if(nAnonymizeDarkcoinAmount > 999999) nAnonymizeDarkcoinAmount = 999999;
|
||||
if(nAnonymizeDarkcoinAmount < 2) nAnonymizeDarkcoinAmount = 2;
|
||||
fEnableDarksend = GetBoolArg("-enabledarksend", fEnableDarksend);
|
||||
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);
|
||||
|
||||
fEnableInstantX = GetBoolArg("-enableinstantx", fEnableInstantX);
|
||||
nInstantXDepth = GetArg("-instantxdepth", nInstantXDepth);
|
||||
|
Loading…
Reference in New Issue
Block a user