Skip to content

Commit dce4cec

Browse files
committed
Replace fedpeg template init check for pak one
1 parent afdf023 commit dce4cec

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/init.cpp

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,17 +1869,11 @@ bool AppInitMain(InitInterfaces& interfaces)
18691869
return false;
18701870
}
18711871

1872-
// ********************************************************* Step 13: Check fedpeg
1873-
// ELEMENTS:
1874-
if (chainparams.GetConsensus().has_parent_chain) {
1875-
// Will assert if not properly formatted
1876-
const CScript& fedpeg_script = chainparams.GetConsensus().fedpegScript;
1877-
unsigned int dummy_required;
1878-
std::vector<std::vector<unsigned char>> dummy_keys;
1879-
if (!MatchLiquidWatchman(fedpeg_script) &&
1880-
fedpeg_script != CScript() << OP_TRUE &&
1881-
!MatchMultisig(fedpeg_script, dummy_required, dummy_keys)) {
1882-
return InitError(_("ERROR: Fedpegscript is not one of the accepted templates: OP_TRUE, CHECKMULTISIG, and Liquidv1"));
1872+
// ********************************************************* Step 13: Check PAK
1873+
if (chainparams.GetEnforcePak()) {
1874+
if (!chainparams.GetConsensus().first_extension_space.empty() &&
1875+
CreatePAKListFromExtensionSpace(chainparams.GetConsensus().first_extension_space).IsReject()) {
1876+
return InitError("PAK is being enforced but initial extension space has invalid entries.");
18831877
}
18841878
}
18851879

0 commit comments

Comments
 (0)