From ffec60954d2eb95861cf247f86f0fdfb0a3ca799 Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Wed, 19 Jun 2019 11:41:33 -0400 Subject: [PATCH] Replace fedpeg template init check for pak one --- src/init.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 5ae7c39d94..75cb0fed24 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1862,17 +1862,11 @@ bool AppInitMain(InitInterfaces& interfaces) return false; } - // ********************************************************* Step 13: Check fedpeg - // ELEMENTS: - if (chainparams.GetConsensus().has_parent_chain) { - // Will assert if not properly formatted - const CScript& fedpeg_script = chainparams.GetConsensus().fedpegScript; - unsigned int dummy_required; - std::vector> 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")); + // ********************************************************* Step 13: Check PAK + if (chainparams.GetEnforcePak()) { + if (!chainparams.GetConsensus().first_extension_space.empty() && + CreatePAKListFromExtensionSpace(chainparams.GetConsensus().first_extension_space).IsReject()) { + return InitError("PAK is being enforced but initial extension space has invalid entries."); } }