mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
feat: new command line argument -bip147height for bitcoin#21373
This command line argument is substitute for -segwitheight so far as dash does not have a segwit feature
This commit is contained in:
parent
51911388f2
commit
a933a60b1a
@ -861,6 +861,7 @@ public:
|
||||
UpdateActivationParametersFromArgs(args);
|
||||
UpdateDIP3ParametersFromArgs(args);
|
||||
UpdateDIP8ParametersFromArgs(args);
|
||||
UpdateBIP147ParametersFromArgs(args);
|
||||
UpdateBudgetParametersFromArgs(args);
|
||||
|
||||
genesis = CreateGenesisBlock(1417713337, 1096447, 0x207fffff, 1, 50 * COIN);
|
||||
@ -986,6 +987,12 @@ public:
|
||||
}
|
||||
void UpdateDIP8ParametersFromArgs(const ArgsManager& args);
|
||||
|
||||
void UpdateBIP147Parameters(int nActivationHeight)
|
||||
{
|
||||
consensus.BIP147Height = nActivationHeight;
|
||||
}
|
||||
void UpdateBIP147ParametersFromArgs(const ArgsManager& args);
|
||||
|
||||
/**
|
||||
* Allows modifying the budget regtest parameters.
|
||||
*/
|
||||
@ -1118,6 +1125,18 @@ void CRegTestParams::UpdateDIP8ParametersFromArgs(const ArgsManager& args)
|
||||
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;
|
||||
|
@ -21,6 +21,7 @@ void SetupChainParamsBaseOptions(ArgsManager& argsman)
|
||||
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("-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);
|
||||
argsman.AddArg("-llmqchainlocks=<quorum name>", "Override the default LLMQ type used for ChainLocks. Allows using ChainLocks with smaller LLMQs. (default: llmq_devnet, devnet-only)", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
|
||||
|
Loading…
Reference in New Issue
Block a user