mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 03:22:47 +01:00
refactor: remove command line argument -bip147height, -dip8params
bip147height is superseeded by -testactivationheight=bip147@height dip8params is superseeded by -testactivationheight=dip0008@height
This commit is contained in:
parent
d8ce0a74fa
commit
de821b9b15
4
doc/release-notes-6325.md
Normal file
4
doc/release-notes-6325.md
Normal file
@ -0,0 +1,4 @@
|
||||
Tests
|
||||
-----
|
||||
|
||||
- Command line arguments -dip8params, -bip147height are removed in favour of -testactivationheight. (dash#6325)
|
@ -846,8 +846,6 @@ public:
|
||||
|
||||
UpdateActivationParametersFromArgs(args);
|
||||
UpdateDIP3ParametersFromArgs(args);
|
||||
UpdateDIP8ParametersFromArgs(args);
|
||||
UpdateBIP147ParametersFromArgs(args);
|
||||
UpdateBudgetParametersFromArgs(args);
|
||||
|
||||
genesis = CreateGenesisBlock(1417713337, 1096447, 0x207fffff, 1, 50 * COIN);
|
||||
@ -966,21 +964,6 @@ public:
|
||||
}
|
||||
void UpdateDIP3ParametersFromArgs(const ArgsManager& args);
|
||||
|
||||
/**
|
||||
* Allows modifying the DIP8 activation height
|
||||
*/
|
||||
void UpdateDIP8Parameters(int nActivationHeight)
|
||||
{
|
||||
consensus.DIP0008Height = nActivationHeight;
|
||||
}
|
||||
void UpdateDIP8ParametersFromArgs(const ArgsManager& args);
|
||||
|
||||
void UpdateBIP147Parameters(int nActivationHeight)
|
||||
{
|
||||
consensus.BIP147Height = nActivationHeight;
|
||||
}
|
||||
void UpdateBIP147ParametersFromArgs(const ArgsManager& args);
|
||||
|
||||
/**
|
||||
* Allows modifying the budget regtest parameters.
|
||||
*/
|
||||
@ -1137,35 +1120,6 @@ void CRegTestParams::UpdateDIP3ParametersFromArgs(const ArgsManager& args)
|
||||
UpdateDIP3Parameters(nDIP3ActivationHeight, nDIP3EnforcementHeight);
|
||||
}
|
||||
|
||||
void CRegTestParams::UpdateDIP8ParametersFromArgs(const ArgsManager& args)
|
||||
{
|
||||
if (!args.IsArgSet("-dip8params")) return;
|
||||
|
||||
std::string strParams = args.GetArg("-dip8params", "");
|
||||
std::vector<std::string> vParams = SplitString(strParams, ':');
|
||||
if (vParams.size() != 1) {
|
||||
throw std::runtime_error("DIP8 parameters malformed, expecting <activation>");
|
||||
}
|
||||
int nDIP8ActivationHeight;
|
||||
if (!ParseInt32(vParams[0], &nDIP8ActivationHeight)) {
|
||||
throw std::runtime_error(strprintf("Invalid activation height (%s)", vParams[0]));
|
||||
}
|
||||
LogPrintf("Setting DIP8 parameters to activation=%ld\n", nDIP8ActivationHeight);
|
||||
UpdateDIP8Parameters(nDIP8ActivationHeight);
|
||||
}
|
||||
|
||||
void CRegTestParams::UpdateBIP147ParametersFromArgs(const ArgsManager& args)
|
||||
{
|
||||
if (!args.IsArgSet("-bip147height")) return;
|
||||
int nBIP147Height;
|
||||
const std::string strParams = args.GetArg("-bip147height", "");
|
||||
if (!ParseInt32(strParams, &nBIP147Height)) {
|
||||
throw std::runtime_error(strprintf("Invalid activation height (%s)", strParams));
|
||||
}
|
||||
LogPrintf("Setting BIP147 parameters to activation=%lld\n", nBIP147Height);
|
||||
UpdateBIP147Parameters(nBIP147Height);
|
||||
}
|
||||
|
||||
void CRegTestParams::UpdateBudgetParametersFromArgs(const ArgsManager& args)
|
||||
{
|
||||
if (!args.IsArgSet("-budgetparams")) return;
|
||||
|
@ -20,8 +20,6 @@ void SetupChainParamsBaseOptions(ArgsManager& argsman)
|
||||
argsman.AddArg("-budgetparams=<masternode>:<budget>:<superblock>", "Override masternode, budget and superblock start heights (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS);
|
||||
argsman.AddArg("-devnet=<name>", "Use devnet chain with provided name", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
|
||||
argsman.AddArg("-dip3params=<activation>:<enforcement>", "Override DIP3 activation and enforcement heights (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS);
|
||||
argsman.AddArg("-dip8params=<activation>", "Override DIP8 activation height (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS);
|
||||
argsman.AddArg("-bip147height=<activation>", "Override BIP147 activation height (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS);
|
||||
argsman.AddArg("-testactivationheight=name@height.", "Set the activation height of 'name' (bip147, bip34, dersig, cltv, csv, brr, dip0001, dip0008, v20, mn_rr). (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
|
||||
argsman.AddArg("-highsubsidyblocks=<n>", "The number of blocks with a higher than normal subsidy to mine at the start of a chain. Block after that height will have fixed subsidy base. (default: 0, devnet-only)", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
|
||||
argsman.AddArg("-highsubsidyfactor=<n>", "The factor to multiply the normal block subsidy by while in the highsubsidyblocks window of a chain (default: 1, devnet-only)", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
|
||||
|
Loading…
Reference in New Issue
Block a user