| 1330 | class CLiquidV1TestParams : public CLiquidV1Params { |
| 1331 | public: |
| 1332 | explicit CLiquidV1TestParams(const ArgsManager& args) : CLiquidV1Params(args) |
| 1333 | { |
| 1334 | // Our goal here is to override ONLY the things from liquidv1 that make no sense for a test chain / which are pointless and burdensome to require people to override manually. |
| 1335 | |
| 1336 | strNetworkID = "liquidv1test"; |
| 1337 | |
| 1338 | m_is_test_chain = true; |
| 1339 | m_is_mockable_chain = false; |
| 1340 | |
| 1341 | vSeeds.clear(); // No network seeds |
| 1342 | vFixedSeeds.clear(); // No network seeds |
| 1343 | |
| 1344 | // 51 means OP_TRUE, this can be overridden on the commandline |
| 1345 | std::vector<unsigned char> sign_bytes = ParseHex("51"); |
| 1346 | consensus.signblockscript = CScript(sign_bytes.begin(), sign_bytes.end()); |
| 1347 | |
| 1348 | // Do not mandate a specific destination for fees in testing |
| 1349 | consensus.mandatory_coinbase_destination = CScript(); // Blank script allows any coinbase destination |
| 1350 | |
| 1351 | // The bitcoin regtest genesis blockhash is the default, not the mainchain |
| 1352 | parentGenesisBlockHash = uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"); |
| 1353 | const bool parent_genesis_is_null = parentGenesisBlockHash == uint256(); |
| 1354 | assert(consensus.has_parent_chain != parent_genesis_is_null); |
| 1355 | |
| 1356 | // This is the regtest limit, not the mainchain limit. |
| 1357 | consensus.parentChainPowLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); |
| 1358 | consensus.parent_chain_signblockscript = CScript(); // It has PoW |
| 1359 | |
| 1360 | // Default to 8, not 100, for expedited testing. |
| 1361 | consensus.pegin_min_depth = DEFAULT_PEGIN_CONFIRMATION_DEPTH; |
| 1362 | |
| 1363 | // Default fedpegscrit is OP_TRUE (tests should override it) |
| 1364 | consensus.fedpegScript = CScript() << OP_TRUE; |
| 1365 | |
| 1366 | // For testing purposes, default to the same junk keys that CustomParams uses (this can be overridden.) |
| 1367 | consensus.first_extension_space = {ParseHex("02fcba7ecf41bc7e1be4ee122d9d22e3333671eb0a3a87b5cdf099d59874e1940f02fcba7ecf41bc7e1be4ee122d9d22e3333671eb0a3a87b5cdf099d59874e1940f")}; |
| 1368 | |
| 1369 | // Don't use liquidv1's height to enable taproot |
| 1370 | consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nStartTime = 0; |
| 1371 | |
| 1372 | // Use all regtest rather than mainchain magic numbers: |
| 1373 | bech32_hrp = args.GetArg("-bech32_hrp", "ert"); |
| 1374 | blech32_hrp = args.GetArg("-blech32_hrp", "el"); |
| 1375 | base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1, args.GetIntArg("-pubkeyprefix", 235)); |
| 1376 | base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1, args.GetIntArg("-scriptprefix", 75)); |
| 1377 | base58Prefixes[BLINDED_ADDRESS] = std::vector<unsigned char>(1, args.GetIntArg("-blindedprefix", 4)); |
| 1378 | base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1, args.GetIntArg("-secretprefix", 239)); |
| 1379 | base58Prefixes[PARENT_PUBKEY_ADDRESS] = std::vector<unsigned char>(1, args.GetIntArg("-parentpubkeyprefix", 111)); |
| 1380 | base58Prefixes[PARENT_SCRIPT_ADDRESS] = std::vector<unsigned char>(1, args.GetIntArg("-parentscriptprefix", 196)); |
| 1381 | parent_bech32_hrp = args.GetArg("-parent_bech32_hrp", "bcrt"); |
| 1382 | parent_blech32_hrp = args.GetArg("-parent_blech32_hrp", "bcrt"); |
| 1383 | |
| 1384 | std::string extpubprefix = args.GetArg("-extpubkeyprefix", "043587CF"); |
| 1385 | assert(IsHex(extpubprefix) && extpubprefix.size() == 8 && "-extpubkeyprefix must be hex string of length 8"); |
| 1386 | base58Prefixes[EXT_PUBLIC_KEY] = ParseHex(extpubprefix); |
| 1387 | |
| 1388 | std::string extprvprefix = args.GetArg("-extprvkeyprefix", "04358394"); |
| 1389 | assert(IsHex(extprvprefix) && extprvprefix.size() == 8 && "-extprvkeyprefix must be hex string of length 8"); |
nothing calls this directly
no test coverage detected