mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Replace fedpeg template init check for pak one
This commit is contained in:
parent
afdf0239ba
commit
dce4cecdda
1 changed files with 5 additions and 11 deletions
16
src/init.cpp
16
src/init.cpp
|
|
@ -1869,17 +1869,11 @@ bool AppInitMain(InitInterfaces& interfaces)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ********************************************************* Step 13: Check fedpeg
|
// ********************************************************* Step 13: Check PAK
|
||||||
// ELEMENTS:
|
if (chainparams.GetEnforcePak()) {
|
||||||
if (chainparams.GetConsensus().has_parent_chain) {
|
if (!chainparams.GetConsensus().first_extension_space.empty() &&
|
||||||
// Will assert if not properly formatted
|
CreatePAKListFromExtensionSpace(chainparams.GetConsensus().first_extension_space).IsReject()) {
|
||||||
const CScript& fedpeg_script = chainparams.GetConsensus().fedpegScript;
|
return InitError("PAK is being enforced but initial extension space has invalid entries.");
|
||||||
unsigned int dummy_required;
|
|
||||||
std::vector<std::vector<unsigned char>> dummy_keys;
|
|
||||||
if (!MatchLiquidWatchman(fedpeg_script) &&
|
|
||||||
fedpeg_script != CScript() << OP_TRUE &&
|
|
||||||
!MatchMultisig(fedpeg_script, dummy_required, dummy_keys)) {
|
|
||||||
return InitError(_("ERROR: Fedpegscript is not one of the accepted templates: OP_TRUE, CHECKMULTISIG, and Liquidv1"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue