mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Fix liquidv1 sync
A single field wasn't given a positive value which meant it considers no peg-ins to be valid.
This commit is contained in:
parent
1e5da20b5e
commit
b73ff4ccfe
3 changed files with 6 additions and 2 deletions
|
|
@ -725,6 +725,9 @@ public:
|
||||||
|
|
||||||
g_con_blockheightinheader = true;
|
g_con_blockheightinheader = true;
|
||||||
g_con_elementsmode = true;
|
g_con_elementsmode = true;
|
||||||
|
// TODO: Pick appropriate value for this network.
|
||||||
|
consensus.total_valid_epochs = 2;
|
||||||
|
|
||||||
|
|
||||||
consensus.genesis_subsidy = 0;
|
consensus.genesis_subsidy = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,8 @@ struct Params {
|
||||||
// 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;
|
||||||
// Used to allow M-epoch-old peg-in addresses as deposits
|
// 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
|
} // 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));
|
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));
|
fedpegscripts.resize(std::min(fedpegscripts.size(), params.total_valid_epochs));
|
||||||
return fedpegscripts;
|
return fedpegscripts;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue