Latest Komodo changes

This commit is contained in:
miketout
2018-11-17 17:28:45 -08:00
16 changed files with 274 additions and 196 deletions

View File

@@ -1664,6 +1664,7 @@ void komodo_args(char *argv0)
fprintf(stderr,"KOMODO_EXCHANGEWALLET mode active\n");
DONATION_PUBKEY = GetArg("-donation", "");
NOTARY_PUBKEY = GetArg("-pubkey", "");
KOMODO_DEALERNODE = GetArg("-dealer",0);
if ( strlen(NOTARY_PUBKEY.c_str()) == 66 )
{
USE_EXTERNAL_PUBKEY = 1;
@@ -1791,10 +1792,18 @@ void komodo_args(char *argv0)
decode_hex(ASSETCHAINS_OVERRIDE_PUBKEY33,33,(char *)ASSETCHAINS_OVERRIDE_PUBKEY.c_str());
calc_rmd160_sha256(ASSETCHAINS_OVERRIDE_PUBKEYHASH,ASSETCHAINS_OVERRIDE_PUBKEY33,33);
}
if ( ASSETCHAINS_COMMISSION == 0 && ASSETCHAINS_FOUNDERS != 0 )
if ( ASSETCHAINS_COMMISSION == 0 )
{
ASSETCHAINS_COMMISSION = 53846154; // maps to 35%
printf("ASSETCHAINS_COMMISSION defaulted to 35%% when founders reward active\n");
if (ASSETCHAINS_FOUNDERS != 0 )
{
ASSETCHAINS_COMMISSION = 53846154; // maps to 35%
printf("ASSETCHAINS_COMMISSION defaulted to 35%% when founders reward active\n");
}
else
{
ASSETCHAINS_OVERRIDE_PUBKEY.clear();
printf("-ac_perc must be set with -ac_pubkey\n");
}
}
}
else
@@ -1812,8 +1821,7 @@ void komodo_args(char *argv0)
}
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 )
{
printf("perc.%llu\n",(long long)ASSETCHAINS_COMMISSION);
fprintf(stderr,"perc %.4f%% ac_pub=[%02x%02x%02x...]\n",dstr(ASSETCHAINS_COMMISSION)*100,ASSETCHAINS_OVERRIDE_PUBKEY33[0],ASSETCHAINS_OVERRIDE_PUBKEY33[1],ASSETCHAINS_OVERRIDE_PUBKEY33[2]);
extraptr = extrabuf;
memcpy(extraptr,ASSETCHAINS_OVERRIDE_PUBKEY33,33), extralen = 33;
@@ -1881,9 +1889,8 @@ void komodo_args(char *argv0)
if ( ASSETCHAINS_CC >= KOMODO_FIRSTFUNGIBLEID && MAX_MONEY < 1000000LL*SATOSHIDEN )
MAX_MONEY = 1000000LL*SATOSHIDEN;
if ( MAX_MONEY <= 0 || MAX_MONEY > 1000000000LL*SATOSHIDEN )
MAX_MONEY = 1000000000LL*SATOSHIDEN;
if ( MAX_MONEY <= 0 || MAX_MONEY > 10000100000LL*SATOSHIDEN )
MAX_MONEY = 10000100000LL*SATOSHIDEN;
//fprintf(stderr,"MAX_MONEY %llu %.8f\n",(long long)MAX_MONEY,(double)MAX_MONEY/SATOSHIDEN);
//printf("baseid.%d MAX_MONEY.%s %.8f\n",baseid,ASSETCHAINS_SYMBOL,(double)MAX_MONEY/SATOSHIDEN);
ASSETCHAINS_P2PPORT = komodo_port(ASSETCHAINS_SYMBOL,ASSETCHAINS_SUPPLY,&ASSETCHAINS_MAGIC,extraptr,extralen);
@@ -1988,6 +1995,8 @@ void komodo_args(char *argv0)
dpowconfs = 0;
} 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 )
KOMODO_EXTRASATOSHI = 1;
}
void komodo_nameset(char *symbol,char *dest,char *source)