mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
signet: hard-coded parameters for Signet Global Network VI (2020-09-07)
Co-authored-by: Anthony Towns <aj@erisian.com.au>
This commit is contained in:
parent
c7898bca4e
commit
3efe298dcc
@ -265,19 +265,25 @@ public:
|
||||
vSeeds.clear();
|
||||
|
||||
if (!args.IsArgSet("-signetchallenge")) {
|
||||
throw std::runtime_error(strprintf("%s: -signetchallenge is mandatory for signet networks", __func__));
|
||||
LogPrintf("Using default signet network\n");
|
||||
bin = ParseHex("512103ad5e0edad18cb1f0fc0d28a3d4f1f3e445640337489abb10404f2d1e086be430210359ef5021964fe22d6f8e05b2463c9540ce96883fe3b278760f048f5189f2e6c452ae");
|
||||
vSeeds.emplace_back("178.128.221.177");
|
||||
vSeeds.emplace_back("2a01:7c8:d005:390::5");
|
||||
vSeeds.emplace_back("ntv3mtqw5wt63red.onion:38333");
|
||||
} else {
|
||||
const auto signet_challenge = args.GetArgs("-signetchallenge");
|
||||
if (signet_challenge.size() != 1) {
|
||||
throw std::runtime_error(strprintf("%s: -signetchallenge cannot be multiple values.", __func__));
|
||||
}
|
||||
bin = ParseHex(signet_challenge[0]);
|
||||
|
||||
LogPrintf("Signet with challenge %s\n", signet_challenge[0]);
|
||||
}
|
||||
const auto signet_challenge = args.GetArgs("-signetchallenge");
|
||||
if (signet_challenge.size() != 1) {
|
||||
throw std::runtime_error(strprintf("%s: -signetchallenge cannot be multiple values.", __func__));
|
||||
}
|
||||
bin = ParseHex(signet_challenge[0]);
|
||||
|
||||
if (args.IsArgSet("-signetseednode")) {
|
||||
vSeeds = args.GetArgs("-signetseednode");
|
||||
}
|
||||
|
||||
LogPrintf("Signet with challenge %s\n", signet_challenge[0]);
|
||||
|
||||
strNetworkID = CBaseChainParams::SIGNET;
|
||||
consensus.signet_blocks = true;
|
||||
consensus.signet_challenge.assign(bin.begin(), bin.end());
|
||||
|
@ -25,8 +25,8 @@ void SetupChainParamsBaseOptions(ArgsManager& argsman)
|
||||
argsman.AddArg("-testnet", "Use the test chain. Equivalent to -chain=test.", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
|
||||
argsman.AddArg("-vbparams=deployment:start:end", "Use given start/end times for specified version bits deployment (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS);
|
||||
argsman.AddArg("-signet", "Use the signet chain. Note that the network is defined by the -signetchallenge parameter", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
|
||||
argsman.AddArg("-signetchallenge", "Blocks must satisfy the given script to be considered valid (only for signet networks)", ArgsManager::ALLOW_STRING, OptionsCategory::CHAINPARAMS);
|
||||
argsman.AddArg("-signetseednode", "Specify a seed node for the signet network, in the hostname[:port] format, e.g. sig.net:1234 (may be used multiple times to specify multiple seed nodes)", ArgsManager::ALLOW_STRING, OptionsCategory::CHAINPARAMS);
|
||||
argsman.AddArg("-signetchallenge", "Blocks must satisfy the given script to be considered valid (only for signet networks; defaults to the global default signet test network challenge)", ArgsManager::ALLOW_STRING, OptionsCategory::CHAINPARAMS);
|
||||
argsman.AddArg("-signetseednode", "Specify a seed node for the signet network, in the hostname[:port] format, e.g. sig.net:1234 (may be used multiple times to specify multiple seed nodes; defaults to the global default signet test network seed node(s))", ArgsManager::ALLOW_STRING, OptionsCategory::CHAINPARAMS);
|
||||
}
|
||||
|
||||
static std::unique_ptr<CBaseChainParams> globalChainBaseParams;
|
||||
|
Loading…
Reference in New Issue
Block a user