StartShutdown(); instead of exit()
This commit is contained in:
@@ -1675,7 +1675,7 @@ void komodo_args(char *argv0)
|
||||
IS_STAKED_NOTARY = GetArg("-stakednotary", -1);
|
||||
if ( IS_STAKED_NOTARY != -1 && IS_KOMODO_NOTARY == true ) {
|
||||
fprintf(stderr, "Cannot be STAKED and KMD notary at the same time!\n");
|
||||
exit(0);
|
||||
StartShutdown();
|
||||
}
|
||||
memset(ccenables,0,sizeof(ccenables));
|
||||
memset(disablebits,0,sizeof(disablebits));
|
||||
@@ -1800,7 +1800,7 @@ void komodo_args(char *argv0)
|
||||
if ( ASSETCHAINS_SUPPLY > (uint64_t)90*1000*1000000 )
|
||||
{
|
||||
fprintf(stderr,"-ac_supply must be less than 90 billion\n");
|
||||
exit(0);
|
||||
StartShutdown();
|
||||
}
|
||||
fprintf(stderr,"ASSETCHAINS_SUPPLY %llu\n",(long long)ASSETCHAINS_SUPPLY);
|
||||
|
||||
@@ -1839,7 +1839,7 @@ void komodo_args(char *argv0)
|
||||
if ( ASSETCHAINS_COMMISSION != 0 && ASSETCHAINS_FOUNDERS_REWARD != 0 )
|
||||
{
|
||||
fprintf(stderr,"cannot use founders reward and commission on the same chain.\n");
|
||||
exit(0);
|
||||
StartShutdown();
|
||||
}
|
||||
if ( ASSETCHAINS_CC != 0 )
|
||||
{
|
||||
@@ -1879,7 +1879,7 @@ void komodo_args(char *argv0)
|
||||
if ( ASSETCHAINS_BEAMPORT != 0 && ASSETCHAINS_CODAPORT != 0 )
|
||||
{
|
||||
fprintf(stderr,"can only have one of -ac_beam or -ac_coda\n");
|
||||
exit(0);
|
||||
StartShutdown();
|
||||
}
|
||||
ASSETCHAINS_SELFIMPORT = GetArg("-ac_import",""); // BEAM, CODA, PUBKEY, GATEWAY
|
||||
if ( ASSETCHAINS_SELFIMPORT == "PUBKEY" )
|
||||
@@ -1887,18 +1887,18 @@ void komodo_args(char *argv0)
|
||||
if ( strlen(ASSETCHAINS_OVERRIDE_PUBKEY.c_str()) != 66 )
|
||||
{
|
||||
fprintf(stderr,"invalid -ac_pubkey for -ac_import=PUBKEY\n");
|
||||
exit(0);
|
||||
StartShutdown();
|
||||
}
|
||||
}
|
||||
else if ( ASSETCHAINS_SELFIMPORT == "BEAM" && ASSETCHAINS_BEAMPORT == 0 )
|
||||
{
|
||||
fprintf(stderr,"missing -ac_beam for BEAM rpcport\n");
|
||||
exit(0);
|
||||
StartShutdown();
|
||||
}
|
||||
else if ( ASSETCHAINS_SELFIMPORT == "CODA" && ASSETCHAINS_CODAPORT == 0 )
|
||||
{
|
||||
fprintf(stderr,"missing -ac_coda for CODA rpcport\n");
|
||||
exit(0);
|
||||
StartShutdown();
|
||||
}
|
||||
// else it can be gateway coin
|
||||
|
||||
@@ -1926,12 +1926,12 @@ void komodo_args(char *argv0)
|
||||
if ( ASSETCHAINS_SUPPLY > 10000000000 )
|
||||
{
|
||||
printf("ac_pubkey or ac_script wont work with ac_supply over 10 billion\n");
|
||||
exit(0);
|
||||
StartShutdown();
|
||||
}
|
||||
if ( ASSETCHAINS_NOTARY_PAY[0] != 0 )
|
||||
{
|
||||
printf("Assetchains NOTARY PAY cannot be used with ac_pubkey or ac_script.\n");
|
||||
exit(0);
|
||||
StartShutdown();
|
||||
}
|
||||
if ( strlen(ASSETCHAINS_OVERRIDE_PUBKEY.c_str()) == 66 )
|
||||
{
|
||||
@@ -1972,7 +1972,7 @@ void komodo_args(char *argv0)
|
||||
if ( ASSETCHAINS_SCRIPTPUB.size() > 1 && ASSETCHAINS_MARMARA != 0 )
|
||||
{
|
||||
fprintf(stderr,"-ac_script and -ac_marmara are mutually exclusive\n");
|
||||
exit(0);
|
||||
StartShutdown();
|
||||
}
|
||||
if ( ASSETCHAINS_ENDSUBSIDY[0] != 0 || ASSETCHAINS_REWARD[0] != 0 || ASSETCHAINS_HALVING[0] != 0 || ASSETCHAINS_DECAY[0] != 0 || ASSETCHAINS_COMMISSION != 0 || ASSETCHAINS_PUBLIC != 0 || ASSETCHAINS_PRIVATE != 0 || ASSETCHAINS_TXPOW != 0 || ASSETCHAINS_FOUNDERS != 0 || ASSETCHAINS_SCRIPTPUB.size() > 1 || ASSETCHAINS_SELFIMPORT.size() > 0 || ASSETCHAINS_OVERRIDE_PUBKEY33[0] != 0 || ASSETCHAINS_TIMELOCKGTE != _ASSETCHAINS_TIMELOCKOFF|| ASSETCHAINS_ALGO != ASSETCHAINS_EQUIHASH || ASSETCHAINS_LWMAPOS != 0 || ASSETCHAINS_LASTERA > 0 || ASSETCHAINS_BEAMPORT != 0 || ASSETCHAINS_CODAPORT != 0 || ASSETCHAINS_MARMARA != 0 || nonz > 0 || ASSETCHAINS_CCLIB.size() > 0 || ASSETCHAINS_FOUNDERS_REWARD != 0 || ASSETCHAINS_NOTARY_PAY[0] != 0 || ASSETCHAINS_BLOCKTIME != 60 || ASSETCHAINS_CBOPRET != 0 || Mineropret.size() != 0 )
|
||||
{
|
||||
@@ -2150,7 +2150,7 @@ void komodo_args(char *argv0)
|
||||
if ( strcmp(ASSETCHAINS_SYMBOL,"KMD") == 0 )
|
||||
{
|
||||
fprintf(stderr,"cant have assetchain named KMD\n");
|
||||
exit(0);
|
||||
StartShutdown();
|
||||
}
|
||||
if ( (port= komodo_userpass(ASSETCHAINS_USERPASS,ASSETCHAINS_SYMBOL)) != 0 )
|
||||
ASSETCHAINS_RPCPORT = port;
|
||||
@@ -2232,6 +2232,11 @@ void komodo_args(char *argv0)
|
||||
}
|
||||
else if ( strcmp("VRSC",ASSETCHAINS_SYMBOL) == 0 )
|
||||
dpowconfs = 0;
|
||||
else if ( ASSETCHAINS_PRIVATE != 0 )
|
||||
{
|
||||
fprintf(stderr,"-ac_private for a non-PIRATE chain is not supported. The only reason to have an -ac_private chain is for total privacy and that is best achieved with the largest anon set. PIRATE has that and it is recommended to just use PIRATE\n");
|
||||
StartShutdown();
|
||||
}
|
||||
} else BITCOIND_RPCPORT = GetArg("-rpcport", BaseParams().RPCPort());
|
||||
KOMODO_DPOWCONFS = GetArg("-dpowconfs",dpowconfs);
|
||||
if ( ASSETCHAINS_SYMBOL[0] == 0 || strcmp(ASSETCHAINS_SYMBOL,"SUPERNET") == 0 || strcmp(ASSETCHAINS_SYMBOL,"DEX") == 0 || strcmp(ASSETCHAINS_SYMBOL,"COQUI") == 0 || strcmp(ASSETCHAINS_SYMBOL,"PIRATE") == 0 || strcmp(ASSETCHAINS_SYMBOL,"KMDICE") == 0 )
|
||||
|
||||
Reference in New Issue
Block a user