Change ccEnable/Disable to macro

This commit is contained in:
blackjok3r
2019-06-10 20:51:52 +08:00
parent 5fdbf460d5
commit ce6acf0d00
2 changed files with 26 additions and 23 deletions

View File

@@ -59,6 +59,8 @@ one other technical note is that komodod has the insight-explorer extensions bui
#define SMALLVAL 0.000000000000001 #define SMALLVAL 0.000000000000001
#define SATOSHIDEN ((uint64_t)100000000L) #define SATOSHIDEN ((uint64_t)100000000L)
#define dstr(x) ((double)(x) / SATOSHIDEN) #define dstr(x) ((double)(x) / SATOSHIDEN)
#define CCDISABLE memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES))
#define CCENABLE 0
#ifndef _BITS256 #ifndef _BITS256
#define _BITS256 #define _BITS256

View File

@@ -14,6 +14,7 @@
******************************************************************************/ ******************************************************************************/
#include "komodo_defs.h" #include "komodo_defs.h"
#include "key_io.h" #include "key_io.h"
#include "cc/CCinclude.h"
#include <string.h> #include <string.h>
#ifdef _WIN32 #ifdef _WIN32
@@ -2299,60 +2300,60 @@ void komodo_args(char *argv0)
// Set cc enables for all existing ac_cc chains here. // Set cc enables for all existing ac_cc chains here.
if ( strcmp("AXO",ASSETCHAINS_SYMBOL) == 0 ) if ( strcmp("AXO",ASSETCHAINS_SYMBOL) == 0 )
{ {
// No CCs used on this chain yet please ask AXO777 what he needs. // No CCs used on this chain yet.
memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); CCDISABLE;
} }
if ( strcmp("CCL",ASSETCHAINS_SYMBOL) == 0 ) if ( strcmp("CCL",ASSETCHAINS_SYMBOL) == 0 )
{ {
// No CCs used on this chain yet. // No CCs used on this chain yet.
memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); CCDISABLE;
} }
if ( strcmp("COQUI",ASSETCHAINS_SYMBOL) == 0 ) if ( strcmp("COQUI",ASSETCHAINS_SYMBOL) == 0 )
{ {
memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); CCDISABLE;
ASSETCHAINS_CCDISABLES[230] = 0; // DICE ASSETCHAINS_CCDISABLES[230] = CCENABLE;; // DICE
ASSETCHAINS_CCDISABLES[235] = 0; // CHANNELS ASSETCHAINS_CCDISABLES[235] = CCENABLE;; // CHANNELS
ASSETCHAINS_CCDISABLES[236] = 0; // ORACLES ASSETCHAINS_CCDISABLES[236] = CCENABLE;; // ORACLES
ASSETCHAINS_CCDISABLES[227] = 0; // ASSETS ASSETCHAINS_CCDISABLES[227] = CCENABLE;; // ASSETS
ASSETCHAINS_CCDISABLES[242] = 0; // TOKENS ASSETCHAINS_CCDISABLES[242] = CCENABLE;; // TOKENS
} }
if ( strcmp("DION",ASSETCHAINS_SYMBOL) == 0 ) if ( strcmp("DION",ASSETCHAINS_SYMBOL) == 0 )
{ {
// No CCs used on this chain yet. // No CCs used on this chain yet.
memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); CCDISABLE;
} }
if ( strcmp("EQL",ASSETCHAINS_SYMBOL) == 0 ) if ( strcmp("EQL",ASSETCHAINS_SYMBOL) == 0 )
{ {
// No CCs used on this chain yet. // No CCs used on this chain yet.
memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); CCDISABLE;
} }
if ( strcmp("ILN",ASSETCHAINS_SYMBOL) == 0 ) if ( strcmp("ILN",ASSETCHAINS_SYMBOL) == 0 )
{ {
// No CCs used on this chain yet. // No CCs used on this chain yet.
memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); CCDISABLE;
} }
if ( strcmp("MORTY",ASSETCHAINS_SYMBOL) == 0 ) if ( strcmp("MORTY",ASSETCHAINS_SYMBOL) == 0 )
{ {
memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); CCDISABLE;
ASSETCHAINS_CCDISABLES[228] = 0; // FAUCET ASSETCHAINS_CCDISABLES[228] = CCENABLE;; // FAUCET
} }
if ( strcmp("RICK",ASSETCHAINS_SYMBOL) == 0 ) if ( strcmp("RICK",ASSETCHAINS_SYMBOL) == 0 )
{ {
memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); CCDISABLE;
ASSETCHAINS_CCDISABLES[228] = 1; // FAUCET ASSETCHAINS_CCDISABLES[228] = CCENABLE;; // FAUCET
} }
if ( strcmp("SEC",ASSETCHAINS_SYMBOL) == 0 ) if ( strcmp("SEC",ASSETCHAINS_SYMBOL) == 0 )
{ {
memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); CCDISABLE;
ASSETCHAINS_CCDISABLES[227] = 0; // ASSETS ASSETCHAINS_CCDISABLES[227] = CCENABLE;; // ASSETS
ASSETCHAINS_CCDISABLES[242] = 0; // TOKENS ASSETCHAINS_CCDISABLES[242] = CCENABLE;; // TOKENS
} }
if ( strcmp("KMDICE",ASSETCHAINS_SYMBOL) == 0 ) if ( strcmp("KMDICE",ASSETCHAINS_SYMBOL) == 0 )
{ {
memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); CCDISABLE;
ASSETCHAINS_CCDISABLES[228] = 0; // FAUCET ASSETCHAINS_CCDISABLES[228] = CCENABLE;; // FAUCET
ASSETCHAINS_CCDISABLES[230] = 0; // DICE ASSETCHAINS_CCDISABLES[230] = CCENABLE;; // DICE
ASSETCHAINS_CCDISABLES[236] = 0; // ORACLES ASSETCHAINS_CCDISABLES[236] = CCENABLE;; // ORACLES
} }
} else BITCOIND_RPCPORT = GetArg("-rpcport", BaseParams().RPCPort()); } else BITCOIND_RPCPORT = GetArg("-rpcport", BaseParams().RPCPort());
KOMODO_DPOWCONFS = GetArg("-dpowconfs",dpowconfs); KOMODO_DPOWCONFS = GetArg("-dpowconfs",dpowconfs);