mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Create epoch length chainparam
This commit is contained in:
parent
85467c06ce
commit
f2e3495d60
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.nMinimumChainWork = uint256S(args.GetArg("-con_nminimumchainwork", "0x0"));
|
||||||
consensus.defaultAssumeValid = uint256S(args.GetArg("-con_defaultassumevalid", "0x00"));
|
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
|
// TODO: pass in serialized vector of byte vectors, parse into extension space
|
||||||
// Junk keys for testing
|
// Junk keys for testing
|
||||||
consensus.first_extension_space = {ParseHex("02fcba7ecf41bc7e1be4ee122d9d22e3333671eb0a3a87b5cdf099d59874e1940f02fcba7ecf41bc7e1be4ee122d9d22e3333671eb0a3a87b5cdf099d59874e1940f")};
|
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("-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("-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("-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
|
// END ELEMENTS
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,9 @@ struct Params {
|
||||||
CScript signblockscript;
|
CScript signblockscript;
|
||||||
uint32_t max_block_signature_size;
|
uint32_t max_block_signature_size;
|
||||||
// g_signed_blocks - Whether blocks are signed or not, get around circular dep
|
// 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
|
// Used to seed the extension space for first dynamic blocks
|
||||||
std::vector<std::vector<unsigned char>> first_extension_space;
|
std::vector<std::vector<unsigned char>> first_extension_space;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue