mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Create epoch length chainparam
This commit is contained in:
parent
b996a425e1
commit
d10c42a26e
3 changed files with 6 additions and 0 deletions
|
|
@ -482,6 +482,8 @@ class CCustomParams : public CRegTestParams {
|
|||
|
||||
consensus.nMinimumChainWork = uint256S(args.GetArg("-con_nminimumchainwork", "0x0"));
|
||||
consensus.defaultAssumeValid = uint256S(args.GetArg("-con_defaultassumevalid", "0x00"));
|
||||
// TODO: Embed in genesis block in nTime field with new genesis block type
|
||||
consensus.dynamic_epoch_length = args.GetArg("-dynamic_epoch_length", 10);
|
||||
// TODO: pass in serialized vector of byte vectors, parse into extension space
|
||||
// Junk keys for testing
|
||||
consensus.first_extension_space = {ParseHex("02fcba7ecf41bc7e1be4ee122d9d22e3333671eb0a3a87b5cdf099d59874e1940f02fcba7ecf41bc7e1be4ee122d9d22e3333671eb0a3a87b5cdf099d59874e1940f")};
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ void SetupChainParamsBaseOptions()
|
|||
gArgs.AddArg("-pak", "Entries in the PAK list. Order of entries matter.", false, OptionsCategory::ELEMENTS);
|
||||
gArgs.AddArg("-multi_data_permitted", "Allow relay of multiple OP_RETURN outputs. (default: -enforce_pak)", false, OptionsCategory::ELEMENTS);
|
||||
gArgs.AddArg("-con_csv_deploy_start", "Starting height for CSV deployment. (default: -1, which means ACTIVE from genesis)", false, OptionsCategory::ELEMENTS);
|
||||
gArgs.AddArg("-dynamic_epoch_length", "Per-chain parameter that sets how many blocks dynamic federation voting and enforcement are in effect for.", false, OptionsCategory::ELEMENTS);
|
||||
// END ELEMENTS
|
||||
//
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,6 +100,9 @@ struct Params {
|
|||
CScript signblockscript;
|
||||
uint32_t max_block_signature_size;
|
||||
// g_signed_blocks - Whether blocks are signed or not, get around circular dep
|
||||
// Set positive to avoid division by 0
|
||||
// for non-dynafed chains and unit tests
|
||||
uint32_t dynamic_epoch_length = std::numeric_limits<uint32_t>::max();
|
||||
// Used to seed the extension space for first dynamic blocks
|
||||
std::vector<std::vector<unsigned char>> first_extension_space;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue