Mainnet init redirects user to -testnet and -regtest

This commit is contained in:
Jon Layton 2018-10-14 21:15:40 -05:00
parent 5d342bfd8f
commit 3b88401dea
2 changed files with 7 additions and 4 deletions

View File

@ -104,6 +104,11 @@ static bool AppInit(int argc, char* argv[])
}
// Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
try {
std::string strChainName = gArgs.GetChainName();
if (strChainName == CBaseChainParams::MAIN) {
fprintf(stderr, "Please use -testnet or -regtest for now; mainnet is not yet ready.\n");
return false;
}
SelectParams(gArgs.GetChainName());
} catch (const std::exception& e) {
fprintf(stderr, "Error: %s\n", e.what());

View File

@ -141,10 +141,8 @@ public:
uint256 nNonce = uint256S("000000000000000000000000000000000000000000000000000000000000021d");
genesis = CreateGenesisBlock(1478403829, nNonce, 0x1f07ffff, 4, 0, GenesisSolutions::MAINNET);
consensus.hashGenesisBlock = genesis.GetHash();
//assert(genesis.hashMerkleRoot == uint256S("0x19612bcf00ea7611d315d7f43554fa983c6e8c30cba17e52c679e0e80abf7d42"));
//assert(consensus.hashGenesisBlock == uint256S("0x0007104ccda289427919efc39dc9e4d499804b7bebc22df55f8b834301260602"));
assert(false); // Mainnet is not yet ready for production!
assert(genesis.hashMerkleRoot == uint256S("0x19612bcf00ea7611d315d7f43554fa983c6e8c30cba17e52c679e0e80abf7d42"));
assert(consensus.hashGenesisBlock == uint256S("0x0007104ccda289427919efc39dc9e4d499804b7bebc22df55f8b834301260602"));
// vSeeds.emplace_back("dnsseed.btcprivate.org");