Skip to content

Commit

Permalink
signet: hard-coded parameters for Signet Global Network III (2019-08-19)
Browse files Browse the repository at this point in the history
Running with -signet without any other parameters will use this network's parameters.
  • Loading branch information
kallewoof committed Jan 15, 2020
1 parent a3f7b59 commit 892dcca
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,20 +279,24 @@ class SigNetParams : public CChainParams {
uint32_t genesis_nonce = 0;

if (!args.IsArgSet("-signet_blockscript")) {
throw std::runtime_error(strprintf("%s: -signet_blockscript is mandatory for signet networks", __func__));
}
if (args.GetArgs("-signet_blockscript").size() != 1) {
throw std::runtime_error(strprintf("%s: -signet_blockscript cannot be multiple values.", __func__));
}
bin = ParseHex(args.GetArgs("-signet_blockscript")[0]);
if (args.IsArgSet("-signet_genesisnonce")) {
LogPrintf("Using default signet network\n");
bin = ParseHex("512103ad5e0edad18cb1f0fc0d28a3d4f1f3e445640337489abb10404f2d1e086be43051ae");
genesis_nonce = 621297;
vSeeds.push_back("178.128.221.177");
vSeeds.push_back("2a01:7c8:d005:390::5");
vSeeds.push_back("ntv3mtqw5wt63red.onion:38333");
} else {
if (args.GetArgs("-signet_blockscript").size() != 1) {
throw std::runtime_error(strprintf("%s: -signet_blockscript cannot be multiple values.", __func__));
}
bin = ParseHex(args.GetArgs("-signet_blockscript")[0]);
genesis_nonce = args.GetArg("-signet_genesisnonce", 0);
}
if (args.IsArgSet("-signet_seednode")) {
vSeeds = gArgs.GetArgs("-signet_seednode");
}
if (args.IsArgSet("-signet_seednode")) {
vSeeds = gArgs.GetArgs("-signet_seednode");
}

LogPrintf("SigNet with block script %s\n", gArgs.GetArgs("-signet_blockscript")[0]);
LogPrintf("SigNet with block script %s\n", gArgs.GetArgs("-signet_blockscript")[0]);
}

strNetworkID = CBaseChainParams::SIGNET;
g_signet_blockscript = CScript(bin.begin(), bin.end());
Expand Down

0 comments on commit 892dcca

Please sign in to comment.