text: 
  //此源码被清华学神尹成大魔王专业翻译分析并修改
  //尹成QQ77025077
  //尹成微信18510341407
  //尹成所在QQ群721929980
  //尹成邮箱 yinc13@mails.tsinghua.edu.cn
  //尹成毕业于清华大学,微软区块链领域全球最有价值专家
  //https://mvp.microsoft.com/zh-cn/PublicProfile/4033620
  //版权所有（c）2010 Satoshi Nakamoto
  //版权所有（c）2009-2018比特币核心开发者
  //根据MIT软件许可证分发，请参见随附的
  //文件复制或http://www.opensource.org/licenses/mit-license.php。
  
  #include <chainparams.h>
  
  #include <chainparamsseeds.h>
  #include <consensus/merkle.h>
  #include <tinyformat.h>
  #include <util/system.h>
  #include <util/strencodings.h>
  #include <versionbitsinfo.h>
  
  #include <assert.h>
  
  #include <boost/algorithm/string/classification.hpp>
  #include <boost/algorithm/string/split.hpp>
  
  static CBlock CreateGenesisBlock(const char* pszTimestamp, const CScript& genesisOutputScript, uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward)
  {
      CMutableTransaction txNew;
      txNew.nVersion = 1;
      txNew.vin.resize(1);
      txNew.vout.resize(1);
      txNew.vin[0].scriptSig = CScript() << 486604799 << CScriptNum(4) << std::vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
      txNew.vout[0].nValue = genesisReward;
      txNew.vout[0].scriptPubKey = genesisOutputScript;
  
      CBlock genesis;
      genesis.nTime    = nTime;
      genesis.nBits    = nBits;
      genesis.nNonce   = nNonce;
      genesis.nVersion = nVersion;
      genesis.vtx.push_back(MakeTransactionRef(std::move(txNew)));
      genesis.hashPrevBlock.SetNull();
      genesis.hashMerkleRoot = BlockMerkleRoot(genesis);
      return genesis;
  }
  
  /*
   *建造Genesis区块。注意，其生成的输出
   *由于事务最初不存在于
   *数据库。
   *
   *cblock（hash=000000000019d6，ver=1，hashprevblock=0000000000000，hashmerkleroot=4a5e1e，ntime=1231006505，nbits=1d00ffff，nnonce=2083236893，vtx=1）
   *ctransaction（hash=4a5e1e，ver=1，vin.size=1，vout.size=1，nlocktime=0）
   *ctxin（coutpoint（000000，-1），coinbase 04ffff001d0104455468652054696D65732003332F4A616E2F323039204368616E63656C6C6F722066F6E206272696E6B206F66207365636F6E64206266261696C6F75420666F720662616E6B73）
   *ctxout（nvalue=50.00000000，scriptpubkey=0x5f1df16b2b704c8a578d0b）
   *vmerkletree:4A5E1E
   **/
  
  static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward)
  {
      const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
      const CScript genesisOutputScript = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
      return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, nBits, nVersion, genesisReward);
  }
  
  /*
   ＊主网络
   **/
  
  class CMainParams : public CChainParams {
  public:
      CMainParams() {
          strNetworkID = "main";
          consensus.nSubsidyHalvingInterval = 210000;
          consensus.BIP16Exception = uint256S("0x00000000000002dc756eebf4f49723ed8d30cc28a5f108eb94b1ba88ac4f9c22");
          consensus.BIP34Height = 227931;
          consensus.BIP34Hash = uint256S("0x000000000000024b89b42a942fe0d9fea3bb44ab7bd1b19115dd6a759c0808b8");
  consensus.BIP65Height = 388381; //0000000000000004c2b624ed5d7756c508d90fd0da2c7c679febfa6c4735f0
  consensus.BIP66Height = 363725; //00000000000379EAA19DCE8C9B722D46AE6A57C2F1A98819488B50931
          consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
  consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; //两周
          consensus.nPowTargetSpacing = 10 * 60;
          consensus.fPowAllowMinDifficultyBlocks = false;
          consensus.fPowNoRetargeting = false;
  consensus.nRuleChangeActivationThreshold = 1916; //2016中的95%
  consensus.nMinerConfirmationWindow = 2016; //npowTargetTimeSpan/npowTargetSpacing
          consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
  consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; //2008年1月1日
  consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; //2008年12月31日
  
  //部署bip68、bip112和bip113。
          consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0;
  consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1462060800; //2016年5月1日
  consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1493596800; //2017年5月1日
  
  //Segwit的部署（bip141、bip143和bip147）
          consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].bit = 1;
  consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 1479168000; //2016年11月15日。
  consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1510704000; //2017年11月15日。
  
  //最好的链条至少应该有这么多的工作。
          consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000028822fef1c230963535a90d");
  
  //默认情况下，假定此块的祖先中的签名有效。
  consensus.defaultAssumeValid = uint256S("0x0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8"); //五十三万四千二百九十二
  
          /*
           *消息开始字符串设计为在正常数据中不太可能出现。
           *字符很少使用高位ASCII，作为UTF-8无效，并产生
           *任意对齐的32位大整数。
           **/
  
          pchMessageStart[0] = 0xf9;
          pchMessageStart[1] = 0xbe;
          pchMessageStart[2] = 0xb4;
          pchMessageStart[3] = 0xd9;
          nDefaultPort = 8333;
          nPruneAfterHeight = 100000;
          m_assumed_blockchain_size = 200;
          m_assumed_chain_state_size = 3;
  
          genesis = CreateGenesisBlock(1231006505, 2083236893, 0x1d00ffff, 1, 50 * COIN);
          consensus.hashGenesisBlock = genesis.GetHash();
          assert(consensus.hashGenesisBlock == uint256S("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"));
          assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
  
  //注意，在那些支持服务位前缀的服务位中，大多数只支持
  //可能的选项。
  //这在运行时很好，因为如果他们不支持
  //我们想要的服务位，但是我们应该更新它们以支持任何人想要的所有服务位。
  //尽快释放，尽量避免。
  vSeeds.emplace_back("seed.bitcoin.sipa.be"); //Pieter Wuille，仅支持x1、x5、x9和xd
  vSeeds.emplace_back("dnsseed.bluematt.me"); //Matt Corallo，仅支持X9
  vSeeds.emplace_back("dnsseed.bitcoin.dashjr.org"); //卢克达什尔
  vSeeds.emplace_back("seed.bitcoinstats.com"); //Christian Decker，支架x1-xf
  vSeeds.emplace_back("seed.bitcoin.jonasschnelli.ch"); //jonas schnelli，仅支持x1、x5、x9和xd
  vSeeds.emplace_back("seed.btc.petertodd.org"); //Peter Todd，仅支持x1、x5、x9和xd
  vSeeds.emplace_back("seed.bitcoin.sprovoost.nl"); //斯乔尔斯
  
          base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,0);
          base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
          base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,128);
          base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xB2, 0x1E};
          base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xAD, 0xE4};
  
          bech32_hrp = "bc";
  
          vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));
  
          fDefaultConsistencyChecks = false;
          fRequireStandard = true;
          fMineBlocksOnDemand = false;
  
          checkpointData = {
              {
                  { 11111, uint256S("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d")},
                  { 33333, uint256S("0x000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce69f00d7ddfb5d0a6")},
                  { 74000, uint256S("0x0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20")},
                  {105000, uint256S("0x00000000000291ce28027faea320c8d2b054b2e0fe44a773f3eefb151d6bdc97")},
                  {134444, uint256S("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe")},
                  {168000, uint256S("0x000000000000099e61ea72015e79632f216fe6cb33d7899acb35b75c8303b763")},
                  {193000, uint256S("0x000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317")},
                  {210000, uint256S("0x000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e")},
                  {216116, uint256S("0x00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e")},
                  {225430, uint256S("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932")},
                  {250000, uint256S("0x000000000000003887df1f29024b06fc2200b55f8af8f35453d7be294df2d214")},
                  {279000, uint256S("0x0000000000000001ae8c72a0b0c301f67e3afca10e819efa9041e458e9bd7e40")},
                  {295000, uint256S("0x00000000000000004d9b4ef50f0f9d686fd69db2e03af35a100370c64632a983")},
              }
          };
  
          chainTxData = ChainTxData{
  //来自rpc的数据：getchaintxstats 4096 0000000000000000 2e63058c023a9a1de233554f28c7b21380b6c9003f36a8
              /*时间*/1532884444，
              /*NTXCOUNT*/ 331282217,
  
              /*DTXRATE *／2.4
          }；
  
          /*禁用Mainnet上的回退费用*/
  
          m_fallback_fee_enabled = false;
      }
  };
  
  /*
   ＊Testnet（V3）
   **/
  
  class CTestNetParams : public CChainParams {
  public:
      CTestNetParams() {
          strNetworkID = "test";
          consensus.nSubsidyHalvingInterval = 210000;
          consensus.BIP16Exception = uint256S("0x00000000dd30457c001f4095d208cc1296b0eed002427aa599874af7a432b105");
          consensus.BIP34Height = 21111;
          consensus.BIP34Hash = uint256S("0x0000000023b3a96d3484e5abb3755c413e7d41500f8e2a5c3f0dd01299cd8ef8");
  consensus.BIP65Height = 581885; //0000000000 7F6655F22F98E72ED80D8B06DC761D5DA09DF0FA1DC4BE4F861EB6
  consensus.BIP66Height = 330776; //00000000 2104C8C45E99A8853285A3B592602A3CCDE2B832481DA85E9E4BA182
          consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
  consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; //两周
          consensus.nPowTargetSpacing = 10 * 60;
          consensus.fPowAllowMinDifficultyBlocks = true;
          consensus.fPowNoRetargeting = false;
  consensus.nRuleChangeActivationThreshold = 1512; //测试链75%
  consensus.nMinerConfirmationWindow = 2016; //npowTargetTimeSpan/npowTargetSpacing
          consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
  consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; //2008年1月1日
  consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; //2008年12月31日
  
  //部署bip68、bip112和bip113。
          consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0;
  consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1456790400; //2016年3月1日
  consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1493596800; //2017年5月1日
  
  //Segwit的部署（bip141、bip143和bip147）
          consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].bit = 1;
  consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 1462060800; //5月1日2016
  consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1493596800; //5月1日2017
  
  //最好的链条至少应该有这么多的工作。
          consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000007dbe94253893cbd463");
  
  //默认情况下，假定此块的祖先中的签名有效。
  consensus.defaultAssumeValid = uint256S("0x0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75"); //一百三十五万四千三百一十二
  
          pchMessageStart[0] = 0x0b;
          pchMessageStart[1] = 0x11;
          pchMessageStart[2] = 0x09;
          pchMessageStart[3] = 0x07;
          nDefaultPort = 18333;
          nPruneAfterHeight = 1000;
          m_assumed_blockchain_size = 20;
          m_assumed_chain_state_size = 2;
  
          genesis = CreateGenesisBlock(1296688602, 414098458, 0x1d00ffff, 1, 50 * COIN);
          consensus.hashGenesisBlock = genesis.GetHash();
          assert(consensus.hashGenesisBlock == uint256S("0x000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"));
          assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
  
          vFixedSeeds.clear();
          vSeeds.clear();
  //支持ServiceBits筛选的节点应位于顶部
          vSeeds.emplace_back("testnet-seed.bitcoin.jonasschnelli.ch");
          vSeeds.emplace_back("seed.tbtc.petertodd.org");
          vSeeds.emplace_back("seed.testnet.bitcoin.sprovoost.nl");
  vSeeds.emplace_back("testnet-seed.bluematt.me"); //只是稳定节点的静态列表，仅支持X9
  
          base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);
          base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
          base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);
          base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF};
          base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94};
  
          bech32_hrp = "tb";
  
          vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test));
  
          fDefaultConsistencyChecks = false;
          fRequireStandard = false;
          fMineBlocksOnDemand = false;
  
  
          checkpointData = {
              {
                  {546, uint256S("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70")},
              }
          };
  
          chainTxData = ChainTxData{
  //来自rpc的数据：getchaintxstats 4096 0000000000000 37a8cd3e06cd5edbfe9dd1dbc5dacab279376ef7cfc2b4c75
              /*时间*/1531929919，
              /*NTXCOUNT*/ 19438708,
  
              /*DTxRate*号/0.626
          }；
  
          /*在testnet上启用回退费用*/
  
          m_fallback_fee_enabled = true;
      }
  };
  
  /*
   *回归检验
   **/
  
  class CRegTestParams : public CChainParams {
  public:
      explicit CRegTestParams(const ArgsManager& args) {
          strNetworkID = "regtest";
          consensus.nSubsidyHalvingInterval = 150;
          consensus.BIP16Exception = uint256();
  consensus.BIP34Height = 500; //在regtest上激活的bip34（用于功能测试）
          consensus.BIP34Hash = uint256();
  consensus.BIP65Height = 1351; //在regtest上激活的bip65（用于功能测试）
  consensus.BIP66Height = 1251; //在regtest上激活的bip66（用于功能测试）
          consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
  consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; //两周
          consensus.nPowTargetSpacing = 10 * 60;
          consensus.fPowAllowMinDifficultyBlocks = true;
          consensus.fPowNoRetargeting = true;
  consensus.nRuleChangeActivationThreshold = 108; //测试链75%
  consensus.nMinerConfirmationWindow = 144; //比正常速度更快（144而不是2016年）
          consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
          consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 0;
          consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
          consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0;
          consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 0;
          consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
          consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].bit = 1;
          consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = Consensus::BIP9Deployment::ALWAYS_ACTIVE;
          consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
  
  //最好的链条至少应该有这么多的工作。
          consensus.nMinimumChainWork = uint256S("0x00");
  
  //默认情况下，假定此块的祖先中的签名有效。
          consensus.defaultAssumeValid = uint256S("0x00");
  
          pchMessageStart[0] = 0xfa;
          pchMessageStart[1] = 0xbf;
          pchMessageStart[2] = 0xb5;
          pchMessageStart[3] = 0xda;
          nDefaultPort = 18444;
          nPruneAfterHeight = 1000;
          m_assumed_blockchain_size = 0;
          m_assumed_chain_state_size = 0;
  
          UpdateVersionBitsParametersFromArgs(args);
  
          genesis = CreateGenesisBlock(1296688602, 2, 0x207fffff, 1, 50 * COIN);
          consensus.hashGenesisBlock = genesis.GetHash();
          assert(consensus.hashGenesisBlock == uint256S("0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"));
          assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
  
  vFixedSeeds.clear(); //！<regtest模式没有任何固定种子。
  vSeeds.clear();      //！<regtest模式没有任何DNS种子。
  
          fDefaultConsistencyChecks = true;
          fRequireStandard = false;
          fMineBlocksOnDemand = true;
  
          checkpointData = {
              {
                  {0, uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206")},
              }
          };
  
          chainTxData = ChainTxData{
              0,
              0,
              0
          };
  
          base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);
          base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
          base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);
          base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF};
          base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94};
  
          bech32_hrp = "bcrt";
  
          /*在regtest上启用回退费用*/
          m_fallback_fee_enabled = true;
      }
  
      /*
       *允许修改版本位regtest参数。
       **/
  
      void UpdateVersionBitsParameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout)
      {
          consensus.vDeployments[d].nStartTime = nStartTime;
          consensus.vDeployments[d].nTimeout = nTimeout;
      }
      void UpdateVersionBitsParametersFromArgs(const ArgsManager& args);
  };
  
  void CRegTestParams::UpdateVersionBitsParametersFromArgs(const ArgsManager& args)
  {
      if (!args.IsArgSet("-vbparams")) return;
  
      for (const std::string& strDeployment : args.GetArgs("-vbparams")) {
          std::vector<std::string> vDeploymentParams;
          boost::split(vDeploymentParams, strDeployment, boost::is_any_of(":"));
          if (vDeploymentParams.size() != 3) {
              throw std::runtime_error("Version bits parameters malformed, expecting deployment:start:end");
          }
          int64_t nStartTime, nTimeout;
          if (!ParseInt64(vDeploymentParams[1], &nStartTime)) {
              throw std::runtime_error(strprintf("Invalid nStartTime (%s)", vDeploymentParams[1]));
          }
          if (!ParseInt64(vDeploymentParams[2], &nTimeout)) {
              throw std::runtime_error(strprintf("Invalid nTimeout (%s)", vDeploymentParams[2]));
          }
          bool found = false;
          for (int j=0; j < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++j) {
              if (vDeploymentParams[0] == VersionBitsDeploymentInfo[j].name) {
                  UpdateVersionBitsParameters(Consensus::DeploymentPos(j), nStartTime, nTimeout);
                  found = true;
                  LogPrintf("Setting version bits activation parameters for %s to start=%ld, timeout=%ld\n", vDeploymentParams[0], nStartTime, nTimeout);
                  break;
              }
          }
          if (!found) {
              throw std::runtime_error(strprintf("Invalid deployment (%s)", vDeploymentParams[0]));
          }
      }
  }
  
  static std::unique_ptr<const CChainParams> globalChainParams;
  
  const CChainParams &Params() {
      assert(globalChainParams);
      return *globalChainParams;
  }
  
  std::unique_ptr<const CChainParams> CreateChainParams(const std::string& chain)
  {
      if (chain == CBaseChainParams::MAIN)
          return std::unique_ptr<CChainParams>(new CMainParams());
      else if (chain == CBaseChainParams::TESTNET)
          return std::unique_ptr<CChainParams>(new CTestNetParams());
      else if (chain == CBaseChainParams::REGTEST)
          return std::unique_ptr<CChainParams>(new CRegTestParams(gArgs));
      throw std::runtime_error(strprintf("%s: Unknown chain %s.", __func__, chain));
  }
  
  void SelectParams(const std::string& network)
  {
      SelectBaseParams(network);
      globalChainParams = CreateChainParams(network);
  }
  