test
This commit is contained in:
@@ -22,7 +22,7 @@ void komodo_assetchain_pubkeys(char *jsonstr);
|
||||
|
||||
int COINBASE_MATURITY = 100;
|
||||
|
||||
int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,CURRENT_HEIGHT;
|
||||
int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,CURRENT_HEIGHT,ASSETCHAINS_SEED;
|
||||
std::string NOTARY_PUBKEY,ASSETCHAINS_NOTARIES;
|
||||
uint8_t NOTARY_PUBKEY33[33];
|
||||
|
||||
|
||||
@@ -271,6 +271,6 @@ void komodo_assetchain_pubkeys(char *jsonstr)
|
||||
} else fprintf(stderr,"komodo_assetchain_pubkeys i.%d vs n.%d\n",i,n);
|
||||
} else fprintf(stderr,"assetchain pubkeys n.%d\n",n);
|
||||
}
|
||||
else if ( jsonstr != 0 )
|
||||
fprintf(stderr,"assetchain pubkeys couldnt parse.(%s)\n",jsonstr);
|
||||
//else if ( jsonstr != 0 )
|
||||
// fprintf(stderr,"assetchain pubkeys couldnt parse.(%s)\n",jsonstr);
|
||||
}
|
||||
|
||||
@@ -1361,7 +1361,7 @@ char *iguanafmtstr = (char *)"curl --url \"http://127.0.0.1:7778\" --data \"{\\\
|
||||
|
||||
void komodo_args()
|
||||
{
|
||||
std::string name; char *dirname,fname[512],magicstr[9]; uint8_t magic[4]; FILE *fp; int32_t i,len;
|
||||
std::string name,addn; char *dirname,fname[512],magicstr[9]; uint8_t magic[4]; FILE *fp; int32_t i,len;
|
||||
IS_KOMODO_NOTARY = GetBoolArg("-notary", false);
|
||||
NOTARY_PUBKEY = GetArg("-pubkey", "");
|
||||
if ( strlen(NOTARY_PUBKEY.c_str()) == 66 )
|
||||
@@ -1370,6 +1370,9 @@ void komodo_args()
|
||||
if ( name.c_str()[0] != 0 )
|
||||
{
|
||||
ASSETCHAINS_SUPPLY = GetArg("-ac_supply",10);
|
||||
addn = GetArg("-addnode","");
|
||||
if ( strlen(addn.c_str()) > 6 )
|
||||
ASSETCHAINS_SEED = 1;
|
||||
strncpy(ASSETCHAINS_SYMBOL,name.c_str(),sizeof(ASSETCHAINS_SYMBOL)-1);
|
||||
ASSETCHAINS_PORT = komodo_port(ASSETCHAINS_SYMBOL,ASSETCHAINS_SUPPLY,&ASSETCHAINS_MAGIC,&ASSETCHAINS_SHORTFLAG);
|
||||
//fprintf(stderr,"after args: %c%s port.%u magic.%08x supply.%u\n",ASSETCHAINS_SHORTFLAG!=0?'-':'+',ASSETCHAINS_SYMBOL,ASSETCHAINS_PORT,ASSETCHAINS_MAGIC,(int32_t)ASSETCHAINS_SUPPLY);
|
||||
@@ -1398,7 +1401,7 @@ void komodo_args()
|
||||
{
|
||||
fprintf(fp,iguanafmtstr,name.c_str(),name.c_str(),magicstr,ASSETCHAINS_PORT,ASSETCHAINS_PORT+1,"78.47.196.146");
|
||||
fclose(fp);
|
||||
printf("created (%s)\n",fname);
|
||||
//printf("created (%s)\n",fname);
|
||||
} else printf("error creating (%s)\n",fname);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -440,7 +440,7 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int&
|
||||
// Internal miner
|
||||
//
|
||||
#define ROUNDROBIN_DELAY 44
|
||||
extern int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAIN_INIT,KOMODO_INITDONE;
|
||||
extern int32_t ASSETCHAINS_SEED,IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAIN_INIT,KOMODO_INITDONE;
|
||||
extern std::string NOTARY_PUBKEY;
|
||||
extern uint8_t NOTARY_PUBKEY33[33];
|
||||
uint32_t Mining_start,Mining_height;
|
||||
@@ -546,8 +546,10 @@ void static BitcoinMiner(CWallet *pwallet)
|
||||
//fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str());
|
||||
while (true)
|
||||
{
|
||||
if (chainActive.Tip()->nHeight >= 100 && chainparams.MiningRequiresPeers())
|
||||
if (chainparams.MiningRequiresPeers())
|
||||
{
|
||||
if ( ASSETCHAINS_SEED != 0 && chainActive.Tip()->nHeight < 100 )
|
||||
break;
|
||||
// Busy-wait for the network to come online so we don't waste time mining
|
||||
// on an obsolete chain. In regtest mode we expect to fly solo.
|
||||
//fprintf(stderr,"Wait for peers...\n");
|
||||
|
||||
Reference in New Issue
Block a user