diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index 8278d5ea6..1f574a6e8 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -327,8 +327,8 @@ struct basilisk_item *basilisk_issueremote(struct supernet_info *myinfo,int32_t struct basilisk_item *basilisk_requestservice(struct supernet_info *myinfo,char *CMD,int32_t blockflag,cJSON *valsobj,bits256 hash,uint8_t *data,int32_t datalen,uint32_t nBits) { int32_t minresults,timeoutmillis,numsent,delaymillis,encryptflag,fanout; struct basilisk_item *ptr; char buf[4096],*symbol,*str = 0; struct iguana_info *virt,*btcd; - if ( (btcd= iguana_coinfind("BTCD")) != 0 && btcd->RELAYNODE != 0 ) - jaddnum(valsobj,"iamrelay",1); + //if ( (btcd= iguana_coinfind("BTCD")) != 0 && btcd->RELAYNODE != 0 ) + // jaddnum(valsobj,"iamrelay",1); basilisk_addhexstr(&str,valsobj,buf,sizeof(buf),data,datalen); if ( bits256_cmp(hash,GENESIS_PUBKEY) != 0 && bits256_nonz(hash) != 0 ) { @@ -352,9 +352,11 @@ struct basilisk_item *basilisk_requestservice(struct supernet_info *myinfo,char jaddnum(valsobj,"hwm",virt->blocks.hwmchain.height); } } + if ( symbol == 0 ) + symbol = "BTCD"; encryptflag = jint(valsobj,"encrypt"); delaymillis = jint(valsobj,"delay"); - ptr = basilisk_issueremote(myinfo,&numsent,CMD,"BTCD",blockflag,valsobj,fanout,minresults,0,timeoutmillis,0,0,encryptflag,delaymillis,nBits); + ptr = basilisk_issueremote(myinfo,&numsent,CMD,symbol,blockflag,valsobj,fanout,minresults,0,timeoutmillis,0,0,encryptflag,delaymillis,nBits); return(ptr); } @@ -541,8 +543,8 @@ void basilisks_loop(void *arg) void basilisks_init(struct supernet_info *myinfo) { - iguana_initQ(&myinfo->basilisks.submitQ,"submitQ"); - iguana_initQ(&myinfo->basilisks.resultsQ,"resultsQ"); + //iguana_initQ(&myinfo->basilisks.submitQ,"submitQ"); + //iguana_initQ(&myinfo->basilisks.resultsQ,"resultsQ"); portable_mutex_init(&myinfo->allcoins_mutex); portable_mutex_init(&myinfo->basilisk_mutex); portable_mutex_init(&myinfo->gecko_mutex); diff --git a/basilisk/basilisk.h b/basilisk/basilisk.h index cd6f1747c..7ee5ecc69 100755 --- a/basilisk/basilisk.h +++ b/basilisk/basilisk.h @@ -39,7 +39,8 @@ struct basilisk_item struct basilisk_info { - queue_t resultsQ,submitQ; void *launched; //portable_mutex_t *mutex; + //queue_t resultsQ,submitQ; + void *launched; //portable_mutex_t *mutex; struct basilisk_item *issued; struct basilisk_value values[8192]; int32_t numvalues; }; diff --git a/gecko/gecko_blocks.c b/gecko/gecko_blocks.c index 1a8bd795d..a809641d6 100755 --- a/gecko/gecko_blocks.c +++ b/gecko/gecko_blocks.c @@ -67,7 +67,7 @@ struct iguana_bundle *gecko_bundleset(struct iguana_info *virt,struct iguana_blo struct iguana_bundle *gecko_ensurebundle(struct iguana_info *virt,struct iguana_block *block,int32_t origheight,int32_t depth) { - int32_t hdrsi,bundlei,checkbundlei,height = origheight; bits256 zero; struct iguana_bundle *bp = 0; + int32_t hdrsi,bundlei,checkbundlei,height = origheight; bits256 zero; memset(zero.bytes,0,sizeof(zero)); bundlei = (height % virt->chain->bundlesize); hdrsi = (height / virt->chain->bundlesize); diff --git a/gecko/gecko_headers.c b/gecko/gecko_headers.c index 567780bde..2d17997a8 100755 --- a/gecko/gecko_headers.c +++ b/gecko/gecko_headers.c @@ -55,7 +55,7 @@ char *gecko_headersarrived(struct supernet_info *myinfo,struct iguana_info *virt { bits256 hash2,prevhash2; struct iguana_block *block; int32_t height,firstheight,i,len=0,n,num; struct iguana_msgblock msgB; char str[65],str2[65]; num = (int32_t)(datalen / 84); - printf("headers arrived.%d from %s\n",num,bits256_str(str,firsthash2)); + printf("headers.%s arrived.%d from %s\n",virt->symbol,num,bits256_str(str,firsthash2)); if ( (block= iguana_blockfind("geckohdrs",virt,firsthash2)) != 0 && (firstheight= block->height) >= 0 ) { gecko_blockhashupdate(virt,firsthash2,firstheight);