Skip to content

Commit ffec609

Browse files
committed
Replace fedpeg template init check for pak one
1 parent 8dc1de4 commit ffec609

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
@@ -1862,17 +1862,11 @@ bool AppInitMain(InitInterfaces& interfaces)
18621862
return false;
18631863
}
18641864

1865-
// ********************************************************* Step 13: Check fedpeg
1866-
// ELEMENTS:
1867-
if (chainparams.GetConsensus().has_parent_chain) {
1868-
// Will assert if not properly formatted
1869-
const CScript& fedpeg_script = chainparams.GetConsensus().fedpegScript;
1870-
unsigned int dummy_required;
1871-
std::vector<std::vector<unsigned char>> dummy_keys;
1872-
if (!MatchLiquidWatchman(fedpeg_script) &&
1873-
fedpeg_script != CScript() << OP_TRUE &&
1874-
!MatchMultisig(fedpeg_script, dummy_required, dummy_keys)) {
1875-
return InitError(_("ERROR: Fedpegscript is not one of the accepted templates: OP_TRUE, CHECKMULTISIG, and Liquidv1"));
1865+
// ********************************************************* Step 13: Check PAK
1866+
if (chainparams.GetEnforcePak()) {
1867+
if (!chainparams.GetConsensus().first_extension_space.empty() &&
1868+
CreatePAKListFromExtensionSpace(chainparams.GetConsensus().first_extension_space).IsReject()) {
1869+
return InitError("PAK is being enforced but initial extension space has invalid entries.");
18761870
}
18771871
}
18781872

0 commit comments

Comments
 (0)