Apply chainparams_commandline to currently selected chain params.

This commit is contained in:
Artem Pikulin
2019-08-28 13:06:04 +07:00
parent 007af83260
commit 89687d9041
2 changed files with 286 additions and 305 deletions

View File

@@ -170,19 +170,17 @@ bool AppInit(int argc, char* argv[])
try
{
// Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
if (!SelectParamsFromCommandLine()) {
fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n");
return false;
}
void komodo_args(char *argv0);
komodo_args(argv[0]);
void chainparams_commandline();
chainparams_commandline();
fprintf(stderr,"call komodo_args.(%s) NOTARY_PUBKEY.(%s)\n",argv[0],NOTARY_PUBKEY.c_str());
while ( ASSETCHAIN_INIT == 0 )
{
//if ( komodo_is_issuer() != 0 )
// komodo_passport_iteration();
#ifdef _WIN32
boost::this_thread::sleep_for(boost::chrono::seconds(1));
#else
sleep(1);
#endif
}
printf("initialized %s at %u\n",ASSETCHAINS_SYMBOL,(uint32_t)time(NULL));
if (!boost::filesystem::is_directory(GetDataDir(false)))
{
@@ -214,11 +212,6 @@ bool AppInit(int argc, char* argv[])
fprintf(stderr,"Error reading configuration file: %s\n", e.what());
return false;
}
// Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
if (!SelectParamsFromCommandLine()) {
fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n");
return false;
}
// Command-line RPC
bool fCommandLine = false;