mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
9e1c98eaaDon't activate dynafed like custom chains (Gregory Sanders)200a392d8Fix liquidv1 sync (Gregory Sanders) Pull request description: Backport of Fix liquidv1 sync #720 Tree-SHA512: 564653f70d9dbdc63ac5dcff97c2f4a676dcafa61056604043edf05e331e7de70b2df07b9c8be93ae8fad43bf557ddd0eb848d031b04e40f6a26ba923eb94e79
This commit is contained in:
commit
8a6af4ca6a
3 changed files with 12 additions and 2 deletions
|
|
@ -719,6 +719,9 @@ public:
|
|||
|
||||
g_con_blockheightinheader = true;
|
||||
g_con_elementsmode = true;
|
||||
// TODO: Pick appropriate value for this network.
|
||||
consensus.total_valid_epochs = 2;
|
||||
|
||||
|
||||
consensus.genesis_subsidy = 0;
|
||||
|
||||
|
|
@ -780,6 +783,12 @@ public:
|
|||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 0;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
|
||||
|
||||
// Not active yet.
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].bit = 0;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].nStartTime = 0;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].nTimeout = 0;
|
||||
|
||||
|
||||
// Finally, create genesis block
|
||||
genesis = CreateGenesisBlock(consensus, CScript(commit), CScript(OP_RETURN), 1296688602, 2, 0x207fffff, 1, 0);
|
||||
consensus.hashGenesisBlock = genesis.GetHash();
|
||||
|
|
|
|||
|
|
@ -106,7 +106,8 @@ struct Params {
|
|||
// Used to seed the extension space for first dynamic blocks
|
||||
std::vector<std::vector<unsigned char>> first_extension_space;
|
||||
// Used to allow M-epoch-old peg-in addresses as deposits
|
||||
size_t total_valid_epochs;
|
||||
// default 1 to not break legacy chains implicitly.
|
||||
size_t total_valid_epochs = 1;
|
||||
};
|
||||
} // namespace Consensus
|
||||
|
||||
|
|
|
|||
|
|
@ -492,7 +492,7 @@ std::vector<std::pair<CScript, CScript>> GetValidFedpegScripts(const CBlockIndex
|
|||
fedpegscripts.push_back(std::make_pair(GetScriptForDestination(ScriptHash(GetScriptForDestination(WitnessV0ScriptHash(params.fedpegScript)))), params.fedpegScript));
|
||||
}
|
||||
}
|
||||
// Only return up to the latest two of three possible fedpegscripts, which are enforced
|
||||
// Only return up to the latest total_valid_epochs fedpegscripts, which are enforced
|
||||
fedpegscripts.resize(std::min(fedpegscripts.size(), params.total_valid_epochs));
|
||||
return fedpegscripts;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue