-ac_ccenable[]
This commit is contained in:
@@ -55,6 +55,7 @@ extern int32_t KOMODO_CONNECTING,KOMODO_CCACTIVATE,KOMODO_DEALERNODE;
|
||||
extern uint32_t ASSETCHAINS_CC;
|
||||
extern char ASSETCHAINS_SYMBOL[];
|
||||
extern std::string CCerror;
|
||||
extern ASSETCHAINS_CCDISABLES[256];
|
||||
|
||||
#define CC_MAXVINS 1024
|
||||
|
||||
|
||||
@@ -65,6 +65,11 @@ bool Eval::Dispatch(const CC *cond, const CTransaction &txTo, unsigned int nIn)
|
||||
return Invalid("empty-eval");
|
||||
|
||||
uint8_t ecode = cond->code[0];
|
||||
if ( ASSETCHAINS_CCDISABLES[ecode] != 0 )
|
||||
{
|
||||
fprintf(stderr,"%s evalcode.%d %02x\n",txTo.GetHash().GetHex().c_str(),ecode,ecode);
|
||||
return Invalid("disabled-code, -ac_ccenables didnt include this ecode");
|
||||
}
|
||||
cp = &CCinfos[(int32_t)ecode];
|
||||
if ( cp->didinit == 0 )
|
||||
{
|
||||
|
||||
@@ -71,6 +71,7 @@ uint64_t ASSETCHAINS_TIMEUNLOCKFROM = 0, ASSETCHAINS_TIMEUNLOCKTO = 0;
|
||||
|
||||
uint32_t ASSETCHAINS_LASTERA = 1;
|
||||
uint64_t ASSETCHAINS_ENDSUBSIDY[ASSETCHAINS_MAX_ERAS],ASSETCHAINS_REWARD[ASSETCHAINS_MAX_ERAS],ASSETCHAINS_HALVING[ASSETCHAINS_MAX_ERAS],ASSETCHAINS_DECAY[ASSETCHAINS_MAX_ERAS];
|
||||
uint8_t ASSETCHAINS_CCENABLE[256],ASSETCHAINS_CCDISABLES[256];
|
||||
|
||||
#define _ASSETCHAINS_EQUIHASH 0
|
||||
uint32_t ASSETCHAINS_NUMALGOS = 2;
|
||||
|
||||
@@ -1654,7 +1654,7 @@ extern int64_t MAX_MONEY;
|
||||
void komodo_args(char *argv0)
|
||||
{
|
||||
extern const char *Notaries_elected1[][2];
|
||||
std::string name,addn; char *dirname,fname[512],arg0str[64],magicstr[9]; uint8_t magic[4],extrabuf[8192],*extraptr=0; FILE *fp; uint64_t val; uint16_t port; int32_t i,baseid,len,n,extralen = 0;
|
||||
std::string name,addn; char *dirname,fname[512],arg0str[64],magicstr[9]; uint8_t magic[4],extrabuf[8192],*extraptr=0; FILE *fp; uint64_t val; uint16_t port; int32_t i,nonz,baseid,len,n,extralen = 0;
|
||||
IS_KOMODO_NOTARY = GetBoolArg("-notary", false);
|
||||
|
||||
if ( GetBoolArg("-gen", false) != 0 )
|
||||
@@ -1779,6 +1779,23 @@ void komodo_args(char *argv0)
|
||||
ASSETCHAINS_BEAMPORT = GetArg("-ac_beam",0);
|
||||
ASSETCHAINS_CODAPORT = GetArg("-ac_coda",0);
|
||||
ASSETCHAINS_MARMARA = GetArg("-ac_marmara",0);
|
||||
Split(GetArg("-ac_ccenable",""), ASSETCHAINS_CCENABLE, 0);
|
||||
for (i=nonz=0; i<0x100; i++)
|
||||
{
|
||||
if ( ASSETCHAINS_CCENABLE[i] != 0 )
|
||||
{
|
||||
nonz++;
|
||||
fprintf(stderr,"%d ",ASSETCHAINS_CCENABLE[i]);
|
||||
}
|
||||
}
|
||||
fprintf(stderr,"nonz.%d CCENABLES[]\n");
|
||||
if ( nonz > 0 )
|
||||
{
|
||||
for (i=0; i<256; i++)
|
||||
ASSETCHAINS_CCDISABLES[i] = 1;
|
||||
for (i=0; i<256; i++)
|
||||
ASSETCHAINS_CCDISABLES[ASSETCHAINS_CCENABLE[i]] = 0;
|
||||
}
|
||||
if ( ASSETCHAINS_BEAMPORT != 0 && ASSETCHAINS_CODAPORT != 0 )
|
||||
{
|
||||
fprintf(stderr,"can only have one of -ac_beam or -ac_coda\n");
|
||||
|
||||
Reference in New Issue
Block a user