Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
f06b35bddb
  1. 99
      basilisk/basilisk.c
  2. 107
      datachain/datachain.c
  3. 1
      datachain/datachain.h
  4. 4
      gecko/gecko.c
  5. 2
      gecko/gecko.h
  6. 6
      gecko/gecko_blocks.c
  7. 60
      gecko/gecko_delayedPoW.c
  8. 2
      gecko/gecko_miner.c
  9. 2
      iguana/iguana777.c
  10. 8
      iguana/iguana_bundles.c
  11. 42
      iguana/iguana_ramchain.c
  12. 8
      iguana/iguana_realtime.c
  13. 4
      iguana/iguana_recv.c
  14. 1
      iguana/main.c
  15. 16
      includes/iguana_funcs.h
  16. 1
      includes/iguana_globals.h
  17. 9
      includes/iguana_structs.h

99
basilisk/basilisk.c

@ -787,32 +787,9 @@ void basilisk_geckoresult(struct supernet_info *myinfo,struct basilisk_item *ptr
} }
} }
void basilisks_loop(void *arg) void basilisk_pending_result(struct supernet_info *myinfo,struct basilisk_item *ptr,struct basilisk_item *pending)
{
basilisk_metricfunc metricfunc; struct iguana_info *btcd,*virt,*hhtmp; struct basilisk_item *ptr,*tmp,*pending,*parent; int32_t i,iter,maxmillis,done,flag,n; cJSON *valsobj,*retjson; uint32_t now; struct supernet_info *myinfo = arg;
iter = 0;
while ( 1 )
{
//fprintf(stderr,"basilisk iter.%d\n",iter);
//sleep(3);
//fprintf(stderr,"basilisk iter.%d\n",iter);
iter++;
if ( (ptr= queue_dequeue(&myinfo->basilisks.submitQ,0)) != 0 )
{
portable_mutex_lock(&myinfo->basilisk_mutex);
HASH_ADD(hh,myinfo->basilisks.issued,basilisktag,sizeof(ptr->basilisktag),ptr);
portable_mutex_unlock(&myinfo->basilisk_mutex);
ptr->refcount++;
continue;
}
//fprintf(stderr,"A");
if ( (ptr= queue_dequeue(&myinfo->basilisks.resultsQ,0)) != 0 )
{
portable_mutex_lock(&myinfo->basilisk_mutex);
HASH_FIND(hh,myinfo->basilisks.issued,&ptr->basilisktag,sizeof(ptr->basilisktag),pending);
portable_mutex_unlock(&myinfo->basilisk_mutex);
if ( pending != 0 )
{ {
int32_t n; struct basilisk_item *parent; basilisk_metricfunc metricfunc; cJSON *retjson;
if ( (n= pending->numresults) < sizeof(pending->results)/sizeof(*pending->results) ) if ( (n= pending->numresults) < sizeof(pending->results)/sizeof(*pending->results) )
{ {
pending->numresults++; pending->numresults++;
@ -842,15 +819,11 @@ void basilisks_loop(void *arg)
basilisk_geckoresult(myinfo,ptr); basilisk_geckoresult(myinfo,ptr);
} }
} }
} else printf("couldnt find issued.%u\n",ptr->basilisktag);
free(ptr);
continue;
} }
//fprintf(stderr,"B");
flag = 0; int32_t basilisk_issued_iteration(struct supernet_info *myinfo,struct basilisk_item *pending)
portable_mutex_lock(&myinfo->basilisk_mutex);
HASH_ITER(hh,myinfo->basilisks.issued,pending,tmp)
{ {
basilisk_metricfunc metricfunc; struct basilisk_item *parent; int32_t i,flag = 0;
//printf("pending.%u numresults.%d m %f func.%p\n",pending->basilisktag,pending->numresults,pending->metrics[0],pending->metricfunc); //printf("pending.%u numresults.%d m %f func.%p\n",pending->basilisktag,pending->numresults,pending->metrics[0],pending->metricfunc);
if ( (metricfunc= pending->metricfunc) != 0 ) if ( (metricfunc= pending->metricfunc) != 0 )
{ {
@ -878,7 +851,7 @@ void basilisks_loop(void *arg)
pending->retstr = clonestr("{\"error\":\"basilisk timeout\"}"); pending->retstr = clonestr("{\"error\":\"basilisk timeout\"}");
fprintf(stderr,"timeout.%s call metrics.%u lag %f - %f\n",pending->CMD,pending->basilisktag,OS_milliseconds(),pending->expiration); fprintf(stderr,"timeout.%s call metrics.%u lag %f - %f\n",pending->CMD,pending->basilisktag,OS_milliseconds(),pending->expiration);
for (i=0; i<pending->numresults; i++) for (i=0; i<pending->numresults; i++)
if ( (metricfunc= pending->metricfunc) != 0 ) if ( (metricfunc= pending->metricfunc) != 0 && pending->metrics[i] == 0. )
pending->metrics[i] = (*metricfunc)(myinfo,pending,pending->results[i]); pending->metrics[i] = (*metricfunc)(myinfo,pending,pending->results[i]);
flag++; flag++;
} }
@ -889,8 +862,6 @@ void basilisks_loop(void *arg)
if ( pending->dependents == 0 || pending->childrendone >= pending->numchildren ) if ( pending->dependents == 0 || pending->childrendone >= pending->numchildren )
{ {
HASH_DELETE(hh,myinfo->basilisks.issued,pending); HASH_DELETE(hh,myinfo->basilisks.issued,pending);
if ( --pending->refcount == 0 )
{
if ( pending->dependents != 0 ) if ( pending->dependents != 0 )
free(pending->dependents); free(pending->dependents);
fprintf(stderr,"HASH_DELETE free ptr.%u refcount.%d\n",pending->basilisktag,pending->refcount); fprintf(stderr,"HASH_DELETE free ptr.%u refcount.%d\n",pending->basilisktag,pending->refcount);
@ -900,54 +871,38 @@ void basilisks_loop(void *arg)
if ( pending->vals != 0 ) if ( pending->vals != 0 )
free_json(pending->vals), pending->vals = 0; free_json(pending->vals), pending->vals = 0;
free(pending); free(pending);
} else printf("illegal refcount for pending\n");
flag++; flag++;
} }
} }
return(flag);
} }
portable_mutex_unlock(&myinfo->basilisk_mutex);
//fprintf(stderr,"D"); void basilisks_loop(void *arg)
if ( (btcd= iguana_coinfind("BTCD")) != 0 )
{
done = 3;
if ( btcd->RELAYNODE != 0 || btcd->VALIDATENODE != 0 )
{ {
if ( (now= (uint32_t)time(NULL)) > btcd->SEQ.BTCD.lastupdate+10 ) struct iguana_info *btcd,*virt,*hhtmp; struct basilisk_item *ptr,*tmp,*pending; int32_t iter,maxmillis,flag; struct supernet_info *myinfo = arg;
iter = 0;
while ( 1 )
{ {
if ( gecko_sequpdate("BTCD",now) >= 0 ) iter++;
done &= ~1; if ( (ptr= queue_dequeue(&myinfo->basilisks.submitQ,0)) != 0 )
btcd->SEQ.BTCD.lastupdate = (uint32_t)time(NULL); HASH_ADD(hh,myinfo->basilisks.issued,basilisktag,sizeof(ptr->basilisktag),ptr);
} //fprintf(stderr,"A");
} else if ( (ptr= queue_dequeue(&myinfo->basilisks.resultsQ,0)) != 0 )
if ( (now= (uint32_t)time(NULL)) > btcd->SEQ.BTC.lastupdate+30 )
{ {
if ( gecko_sequpdate("BTC",now) >= 0 ) HASH_FIND(hh,myinfo->basilisks.issued,&ptr->basilisktag,sizeof(ptr->basilisktag),pending);
done &= ~2; if ( pending != 0 )
btcd->SEQ.BTC.lastupdate = (uint32_t)time(NULL); basilisk_pending_result(myinfo,ptr,pending);
else printf("couldnt find issued.%u\n",ptr->basilisktag);
free(ptr);
} }
if ( done != 3 ) else
{
valsobj = cJSON_CreateObject();
if ( btcd->RELAYNODE == 0 && btcd->VALIDATENODE == 0 )
{ {
//fprintf(stderr,"e"); flag = 0;
jaddnum(valsobj,"BTCD",btcd->SEQ.BTCD.numstamps+GECKO_FIRSTPOSSIBLEBTCD); HASH_ITER(hh,myinfo->basilisks.issued,pending,tmp)
basilisk_standardservice("SEQ",myinfo,GENESIS_PUBKEY,valsobj,0,0);
flag++;
}
if ( (done & 2) == 0 )
{ {
//fprintf(stderr,"f"); flag += basilisk_issued_iteration(myinfo,pending);
free_json(valsobj);
valsobj = cJSON_CreateObject();
jaddnum(valsobj,"BTC",btcd->SEQ.BTC.numstamps+GECKO_FIRSTPOSSIBLEBTC);
basilisk_standardservice("SEQ",myinfo,GENESIS_PUBKEY,valsobj,0,0);
flag++;
}
free_json(valsobj);
} }
//fprintf(stderr,"G"); if ( flag == 0 && myinfo->allcoins_numvirts > 0 && (btcd= iguana_coinfind("BTCD")) != 0 )
if ( flag == 0 && myinfo->allcoins_numvirts > 0 )
{ {
maxmillis = (1000 / myinfo->allcoins_numvirts) + 1; maxmillis = (1000 / myinfo->allcoins_numvirts) + 1;
//portable_mutex_lock(&Allcoins_mutex); //portable_mutex_lock(&Allcoins_mutex);

107
datachain/datachain.c

@ -13,4 +13,111 @@
* * * *
******************************************************************************/ ******************************************************************************/
#include "../iguana/iguana777.h"
void datachain_BTC_clock(struct supernet_info *myinfo,struct iguana_info *btc,int32_t height,uint32_t hdrsi,uint32_t unspentind)
{
if ( hdrsi < myinfo->dPOW.lastbtc_hdrsi || (hdrsi == myinfo->dPOW.lastbtc_hdrsi && unspentind < myinfo->dPOW.lastbtc_unspentind) )
{
// rewind BTC
}
myinfo->dPOW.lastbtc_hdrsi = hdrsi;
myinfo->dPOW.lastbtc_unspentind = unspentind;
}
void datachain_BTCD_newblock(struct supernet_info *myinfo,struct iguana_info *btcd,int32_t height,uint32_t hdrsi,uint32_t unspentind)
{
if ( hdrsi < myinfo->dPOW.lastbtcd_hdrsi || (hdrsi == myinfo->dPOW.lastbtcd_hdrsi && unspentind < myinfo->dPOW.lastbtcd_unspentind) )
{
// rewind BTCD
}
myinfo->dPOW.lastbtcd_hdrsi = hdrsi;
myinfo->dPOW.lastbtcd_unspentind = unspentind;
}
void datachain_virt_newblock(struct supernet_info *myinfo,struct iguana_info *virt,int32_t height,uint32_t hdrsi,uint32_t unspentind)
{
}
void datachain_opreturn(struct supernet_info *myinfo,struct iguana_info *coin,int32_t btc_or_btcd,int64_t crypto777_payment,int64_t burned,int32_t height,uint64_t hdrsi_unspentind,uint8_t *data,int32_t datalen)
{
uint32_t hdrsi,unspentind;
hdrsi = (uint32_t)(hdrsi_unspentind >> 32);
unspentind = (uint32_t)hdrsi_unspentind;
if ( btc_or_btcd == 1 ) // BTC
{
if ( data == 0 )
datachain_BTC_clock(myinfo,coin,height,hdrsi,unspentind);
else
{
}
}
else if ( btc_or_btcd == 2 ) // BTCD
{
if ( data == 0 )
datachain_BTCD_newblock(myinfo,coin,height,hdrsi,unspentind);
else
{
}
}
else
{
if ( data == 0 )
datachain_virt_newblock(myinfo,coin,height,hdrsi,unspentind);
else
{
}
}
}
int32_t iguana_opreturn(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_bundle *bp,int64_t crypto777_payment,int32_t height,uint64_t hdrsi_unspentind,int64_t burned,uint32_t fileid,uint64_t scriptpos,uint32_t scriptlen)
{
uint8_t scriptspace[IGUANA_MAXSCRIPTSIZE]; char fname[1024]; uint32_t datalen=0; int32_t btc_or_btcd=0,len = -1;
if ( strcmp("BTC",coin->symbol) == 0 )
btc_or_btcd = 1;
else if ( strcmp("BTCD",coin->symbol) == 0 )
btc_or_btcd = 2;
else if ( coin->virtualchain == 0 )
return(-1);
if ( height < bp->bundleheight || height >= bp->bundleheight+coin->chain->bundlesize )
{
printf("iguana_opreturn illegal height %d for [%d] %d\n",height,bp->hdrsi,bp->bundleheight);
return(-1);
}
if ( crypto777_payment == 0 && burned == 0 && scriptlen == 0 && fileid == 0 && scriptpos == 0 )
{
datachain_opreturn(myinfo,coin,btc_or_btcd,crypto777_payment,burned,height,hdrsi_unspentind,0,0);
return(0);
}
if ( scriptpos > 0 && scriptlen > 0 )
{
iguana_voutsfname(coin,bp->ramchain.from_ro,fname,fileid);
if ( (len= iguana_scriptdata(coin,scriptspace,coin->voutptrs[fileid],fname,scriptpos,len)) == scriptlen )
{
if ( scriptspace[0] == 0x6a )
{
len = 1;
if ( (datalen= scriptspace[len++]) >= 76 )
{
if ( datalen == 0x4c )
datalen = scriptspace[len++];
else if ( datalen == 0x4d )
{
datalen = scriptspace[len++];
datalen = (datalen << 8) | scriptspace[len++];
}
}
if ( len+datalen == scriptlen )
{
datachain_opreturn(myinfo,coin,btc_or_btcd,crypto777_payment,burned,height,hdrsi_unspentind,&scriptspace[len],datalen);
return(datalen);
} else printf("len.%d + datalen.%d != scriptlen.%d\n",len,datalen,scriptlen);
} else printf("not OP_RETURN.%02x scriptlen.%d\n",scriptspace[0],scriptlen);
} else printf("iguana_opreturn error: %d bytes from fileid.%d[%d] %s for scriptlen.%d\n",len,fileid,(uint32_t)scriptpos,fname,scriptlen);
}
return(-1);
}

1
datachain/datachain.h

@ -87,4 +87,5 @@ struct datachain_info
{ {
}; };
#endif #endif

4
gecko/gecko.c

@ -44,7 +44,7 @@ void gecko_iteration(struct supernet_info *myinfo,struct iguana_info *btcd,struc
char mineraddr[64]; int32_t hwmhdrsi,longesthdrsi; char mineraddr[64]; int32_t hwmhdrsi,longesthdrsi;
hwmhdrsi = virt->blocks.hwmchain.height / virt->chain->bundlesize; hwmhdrsi = virt->blocks.hwmchain.height / virt->chain->bundlesize;
longesthdrsi = virt->longestchain / virt->chain->bundlesize; longesthdrsi = virt->longestchain / virt->chain->bundlesize;
if ( hwmhdrsi <= longesthdrsi && virt->blocks.hwmchain.height < virt->longestchain-1 ) if ( 0 && hwmhdrsi <= longesthdrsi && virt->blocks.hwmchain.height < virt->longestchain-1 )
{ {
if ( time(NULL) > virt->hdrstime+3 ) if ( time(NULL) > virt->hdrstime+3 )
{ {
@ -331,7 +331,7 @@ struct iguana_info *basilisk_geckochain(struct supernet_info *myinfo,char *symbo
iguana_gentxarray(virt,&virt->TXMEM,&txdata,&len,serialized,datalen); iguana_gentxarray(virt,&virt->TXMEM,&txdata,&len,serialized,datalen);
txdata.zblock.height = 0; txdata.zblock.height = 0;
txdata.zblock.RO.allocsize = iguana_ROallocsize(virt); txdata.zblock.RO.allocsize = iguana_ROallocsize(virt);
gecko_hwmset(virt,&txdata,virt->TXMEM.ptr,serialized,datalen,txdata.numtxids); gecko_hwmset(myinfo,virt,&txdata,virt->TXMEM.ptr,serialized,datalen,txdata.numtxids);
} }
virt->started = virt; virt->started = virt;
virt->active = (uint32_t)time(NULL); virt->active = (uint32_t)time(NULL);

2
gecko/gecko.h

@ -73,7 +73,7 @@ char *basilisk_respond_geckoget(struct supernet_info *myinfo,char *CMD,void *add
void gecko_miner(struct supernet_info *myinfo,struct iguana_info *btcd,struct iguana_info *virt,int32_t maxmillis,uint8_t *minerpubkey33); void gecko_miner(struct supernet_info *myinfo,struct iguana_info *btcd,struct iguana_info *virt,int32_t maxmillis,uint8_t *minerpubkey33);
void gecko_seqresult(struct supernet_info *myinfo,char *retstr); void gecko_seqresult(struct supernet_info *myinfo,char *retstr);
int32_t gecko_sequpdate(char *symbol,uint32_t reftimestamp); int32_t gecko_sequpdate(struct supernet_info *myinfo,char *symbol,uint32_t reftimestamp);
char *gecko_blockarrived(struct supernet_info *myinfo,struct iguana_info *virt,char *remoteaddr,uint8_t *data,int32_t datalen,bits256 hash2); char *gecko_blockarrived(struct supernet_info *myinfo,struct iguana_info *virt,char *remoteaddr,uint8_t *data,int32_t datalen,bits256 hash2);
char *gecko_txarrived(struct supernet_info *myinfo,struct iguana_info *virt,char *remoteaddr,uint8_t *data,int32_t datalen,bits256 hash2); char *gecko_txarrived(struct supernet_info *myinfo,struct iguana_info *virt,char *remoteaddr,uint8_t *data,int32_t datalen,bits256 hash2);
char *gecko_mempoolarrived(struct supernet_info *myinfo,struct iguana_info *virt,char *remoteaddr,uint8_t *data,int32_t datalen,bits256 hash2); char *gecko_mempoolarrived(struct supernet_info *myinfo,struct iguana_info *virt,char *remoteaddr,uint8_t *data,int32_t datalen,bits256 hash2);

6
gecko/gecko_blocks.c

@ -112,7 +112,7 @@ struct iguana_bundle *gecko_ensurebundle(struct iguana_info *virt,struct iguana_
return(bp); return(bp);
} }
int32_t gecko_hwmset(struct iguana_info *virt,struct iguana_txblock *txdata,struct iguana_msgtx *txarray,uint8_t *data,int32_t datalen,int32_t depth) int32_t gecko_hwmset(struct supernet_info *myinfo,struct iguana_info *virt,struct iguana_txblock *txdata,struct iguana_msgtx *txarray,uint8_t *data,int32_t datalen,int32_t depth)
{ {
struct iguana_peer *addr; int32_t i,hdrsi; struct iguana_bundle *bp,*prevbp; struct iguana_block *block; struct iguana_peer *addr; int32_t i,hdrsi; struct iguana_bundle *bp,*prevbp; struct iguana_block *block;
if ( (block= iguana_blockhashset("gecko_hwmset",virt,txdata->zblock.height,txdata->zblock.RO.hash2,1)) != 0 ) if ( (block= iguana_blockhashset("gecko_hwmset",virt,txdata->zblock.height,txdata->zblock.RO.hash2,1)) != 0 )
@ -134,7 +134,7 @@ int32_t gecko_hwmset(struct iguana_info *virt,struct iguana_txblock *txdata,stru
bp->numsaved++; bp->numsaved++;
if ( (block->height % virt->chain->bundlesize) == 13 && hdrsi > 0 && (prevbp= virt->bundles[hdrsi - 1]) != 0 && prevbp->emitfinish == 0 && prevbp->numsaved >= prevbp->n ) if ( (block->height % virt->chain->bundlesize) == 13 && hdrsi > 0 && (prevbp= virt->bundles[hdrsi - 1]) != 0 && prevbp->emitfinish == 0 && prevbp->numsaved >= prevbp->n )
{ {
iguana_bundlefinalize(virt,prevbp,&virt->MEM,virt->MEMB); iguana_bundlefinalize(myinfo,virt,prevbp,&virt->MEM,virt->MEMB);
prevbp->emitfinish = (uint32_t)(time(NULL) - 3600); prevbp->emitfinish = (uint32_t)(time(NULL) - 3600);
iguana_bundlepurgefiles(virt,prevbp); iguana_bundlepurgefiles(virt,prevbp);
iguana_savehdrs(virt); iguana_savehdrs(virt);
@ -236,7 +236,7 @@ char *gecko_blockarrived(struct supernet_info *myinfo,struct iguana_info *virt,c
} }
txdata.zblock.height = block->height; txdata.zblock.height = block->height;
txdata.zblock.mainchain = block->mainchain = 1; txdata.zblock.mainchain = block->mainchain = 1;
if ( gecko_hwmset(virt,&txdata,virt->TXMEM.ptr,data,datalen,i+1) >= 0 ) if ( gecko_hwmset(myinfo,virt,&txdata,virt->TXMEM.ptr,data,datalen,i+1) >= 0 )
{ {
if ( block->height > virt->longestchain ) if ( block->height > virt->longestchain )
virt->longestchain = block->height; virt->longestchain = block->height;

60
gecko/gecko_delayedPoW.c

@ -43,14 +43,14 @@ int32_t gecko_hashstampsfind(struct hashstamp *stamps,int32_t max,struct gecko_s
return(-1); return(-1);
} }
bits256 gecko_hashstampscalc(struct iguana_info *btcd,bits256 *btchashp,uint32_t reftimestamp) bits256 gecko_hashstampscalc(struct supernet_info *myinfo,struct iguana_info *btcd,bits256 *btchashp,uint32_t reftimestamp)
{ {
struct hashstamp BTCDstamps[GECKO_MAXBTCDGAP],BTCstamps[GECKO_MAXBTCGAP]; bits256 btcdhash; struct hashstamp BTCDstamps[GECKO_MAXBTCDGAP],BTCstamps[GECKO_MAXBTCGAP]; bits256 btcdhash;
btcdhash = *btchashp = GENESIS_PUBKEY; btcdhash = *btchashp = GENESIS_PUBKEY;
if ( gecko_hashstampsfind(BTCDstamps,GECKO_MAXBTCDGAP,&btcd->SEQ.BTCD,btcdhash,reftimestamp) < 0 ) if ( gecko_hashstampsfind(BTCDstamps,GECKO_MAXBTCDGAP,&myinfo->dPOW.SEQ.BTCD,btcdhash,reftimestamp) < 0 )
{ {
btcdhash = BTCDstamps[GECKO_MAXBTCDGAP >> 1].hash2; btcdhash = BTCDstamps[GECKO_MAXBTCDGAP >> 1].hash2;
if ( gecko_hashstampsfind(BTCstamps,GECKO_MAXBTCGAP,&btcd->SEQ.BTC,*btchashp,reftimestamp) < 0 ) if ( gecko_hashstampsfind(BTCstamps,GECKO_MAXBTCGAP,&myinfo->dPOW.SEQ.BTC,*btchashp,reftimestamp) < 0 )
*btchashp = BTCstamps[GECKO_MAXBTCGAP >> 1].hash2; *btchashp = BTCstamps[GECKO_MAXBTCGAP >> 1].hash2;
} }
return(btcdhash); return(btcdhash);
@ -117,19 +117,19 @@ int32_t gecko_hashstampsupdate(struct iguana_info *coin,struct gecko_sequence *s
return(seq->numstamps); return(seq->numstamps);
} }
int32_t gecko_sequpdate(char *symbol,uint32_t reftimestamp) int32_t gecko_sequpdate(struct supernet_info *myinfo,char *symbol,uint32_t reftimestamp)
{ {
struct gecko_sequence *seq=0; int32_t max=0,firstpossible=0; struct iguana_info *coin; struct iguana_block *block; struct gecko_sequence *seq=0; int32_t max=0,firstpossible=0; struct iguana_info *coin; struct iguana_block *block;
if ( (coin= iguana_coinfind(symbol)) != 0 && (coin->RELAYNODE != 0 || coin->VALIDATENODE != 0) ) if ( (coin= iguana_coinfind(symbol)) != 0 && (coin->RELAYNODE != 0 || coin->VALIDATENODE != 0) )
{ {
if ( strcmp(symbol,"BTCD") == 0 ) if ( strcmp(symbol,"BTCD") == 0 )
{ {
seq = &coin->SEQ.BTCD; seq = &myinfo->dPOW.SEQ.BTCD;
firstpossible = GECKO_FIRSTPOSSIBLEBTCD; firstpossible = GECKO_FIRSTPOSSIBLEBTCD;
} }
else if ( strcmp(symbol,"BTC") == 0 ) else if ( strcmp(symbol,"BTC") == 0 )
{ {
seq = &coin->SEQ.BTC; seq = &myinfo->dPOW.SEQ.BTC;
firstpossible = GECKO_FIRSTPOSSIBLEBTC; firstpossible = GECKO_FIRSTPOSSIBLEBTC;
} else return(-1); } else return(-1);
//printf("basilisk update.%s %u lag.%d\n",symbol,reftimestamp,(uint32_t)time(NULL)-seq->lastupdate); //printf("basilisk update.%s %u lag.%d\n",symbol,reftimestamp,(uint32_t)time(NULL)-seq->lastupdate);
@ -186,9 +186,9 @@ void gecko_seqresult(struct supernet_info *myinfo,char *retstr)
if ( (btcd= iguana_coinfind("BTCD")) != 0 && (resultjson= cJSON_Parse(retstr)) != 0 ) if ( (btcd= iguana_coinfind("BTCD")) != 0 && (resultjson= cJSON_Parse(retstr)) != 0 )
{ {
if ( jstr(resultjson,"BTCD") != 0 ) if ( jstr(resultjson,"BTCD") != 0 )
seq = &btcd->SEQ.BTCD, firstpossible = GECKO_FIRSTPOSSIBLEBTCD; seq = &myinfo->dPOW.SEQ.BTCD, firstpossible = GECKO_FIRSTPOSSIBLEBTCD;
else if ( jstr(resultjson,"BTC") != 0 ) else if ( jstr(resultjson,"BTC") != 0 )
seq = &btcd->SEQ.BTC, firstpossible = GECKO_FIRSTPOSSIBLEBTC; seq = &myinfo->dPOW.SEQ.BTC, firstpossible = GECKO_FIRSTPOSSIBLEBTC;
if ( seq != 0 ) if ( seq != 0 )
{ {
startheight = jint(resultjson,"start"); startheight = jint(resultjson,"start");
@ -225,9 +225,49 @@ char *basilisk_respond_hashstamps(struct supernet_info *myinfo,char *CMD,void *a
if ( (btcd= iguana_coinfind("BTCD")) != 0 ) if ( (btcd= iguana_coinfind("BTCD")) != 0 )
{ {
if ( (startheight= juint(valsobj,"BTCD")) != 0 ) if ( (startheight= juint(valsobj,"BTCD")) != 0 )
jadd(retjson,"BTCD",gecko_sequencejson(btcd->chain->zcash,&btcd->SEQ.BTCD,startheight,GECKO_FIRSTPOSSIBLEBTCD)); jadd(retjson,"BTCD",gecko_sequencejson(btcd->chain->zcash,&myinfo->dPOW.SEQ.BTCD,startheight,GECKO_FIRSTPOSSIBLEBTCD));
else if ( (startheight= juint(valsobj,"BTC")) != 0 ) else if ( (startheight= juint(valsobj,"BTC")) != 0 )
jadd(retjson,"BTC",gecko_sequencejson(btcd->chain->zcash,&btcd->SEQ.BTC,startheight,GECKO_FIRSTPOSSIBLEBTC)); jadd(retjson,"BTC",gecko_sequencejson(btcd->chain->zcash,&myinfo->dPOW.SEQ.BTC,startheight,GECKO_FIRSTPOSSIBLEBTC));
} }
return(jprint(retjson,1)); return(jprint(retjson,1));
} }
/*
done = 3;
if ( btcd->RELAYNODE != 0 || btcd->VALIDATENODE != 0 )
{
if ( (now= (uint32_t)time(NULL)) > myinfo->dPOW.SEQ.BTCD.lastupdate+10 )
{
if ( gecko_sequpdate(myinfo,"BTCD",now) >= 0 )
done &= ~1;
myinfo->dPOW.SEQ.BTCD.lastupdate = (uint32_t)time(NULL);
}
}
if ( (now= (uint32_t)time(NULL)) > myinfo->dPOW.SEQ.BTC.lastupdate+30 )
{
if ( gecko_sequpdate(myinfo,"BTC",now) >= 0 )
done &= ~2;
myinfo->dPOW.SEQ.BTC.lastupdate = (uint32_t)time(NULL);
}
if ( done != 3 )
{
valsobj = cJSON_CreateObject();
if ( btcd->RELAYNODE == 0 && btcd->VALIDATENODE == 0 )
{
//fprintf(stderr,"e");
jaddnum(valsobj,"BTCD",myinfo->dPOW.SEQ.BTCD.numstamps+GECKO_FIRSTPOSSIBLEBTCD);
basilisk_standardservice("SEQ",myinfo,GENESIS_PUBKEY,valsobj,0,0);
flag++;
}
if ( (done & 2) == 0 )
{
//fprintf(stderr,"f");
free_json(valsobj);
valsobj = cJSON_CreateObject();
jaddnum(valsobj,"BTC",myinfo->dPOW.SEQ.BTC.numstamps+GECKO_FIRSTPOSSIBLEBTC);
basilisk_standardservice("SEQ",myinfo,GENESIS_PUBKEY,valsobj,0,0);
flag++;
}
free_json(valsobj);
}
*/

2
gecko/gecko_miner.c

@ -100,7 +100,7 @@ int32_t gecko_delayedPoW(struct supernet_info *myinfo,struct iguana_info *btcd,i
len += iguana_rwnum(1,&coinbase[len],sizeof(height),(void *)&height); len += iguana_rwnum(1,&coinbase[len],sizeof(height),(void *)&height);
if ( (isPoS & 7) != 0 ) if ( (isPoS & 7) != 0 )
{ {
*btcdhashp = gecko_hashstampscalc(btcd,&btchash,timestamp); *btcdhashp = gecko_hashstampscalc(myinfo,btcd,&btchash,timestamp);
if ( (isPoS & 2) != 0 && (bits256_cmp(*btcdhashp,GENESIS_PUBKEY) == 0 || bits256_nonz(*btcdhashp) == 0) ) if ( (isPoS & 2) != 0 && (bits256_cmp(*btcdhashp,GENESIS_PUBKEY) == 0 || bits256_nonz(*btcdhashp) == 0) )
return(-1); return(-1);
if ( (isPoS & 4) != 0 && (bits256_cmp(btchash,GENESIS_PUBKEY) == 0 || bits256_nonz(btchash) == 0) ) if ( (isPoS & 4) != 0 && (bits256_cmp(btchash,GENESIS_PUBKEY) == 0 || bits256_nonz(btchash) == 0) )

2
iguana/iguana777.c

@ -610,7 +610,7 @@ void iguana_helper(void *arg)
coin->numbundlesQ--; coin->numbundlesQ--;
if ( coin->started != 0 && (bp->nexttime == 0 || time(NULL) > bp->nexttime) && coin->active != 0 ) if ( coin->started != 0 && (bp->nexttime == 0 || time(NULL) > bp->nexttime) && coin->active != 0 )
{ {
flag += iguana_bundleiters(ptr->coin,&MEM,MEMB,bp,ptr->timelimit,IGUANA_DEFAULTLAG); flag += iguana_bundleiters(myinfo,ptr->coin,&MEM,MEMB,bp,ptr->timelimit,IGUANA_DEFAULTLAG);
} }
else else
{ {

8
iguana/iguana_bundles.c

@ -979,7 +979,7 @@ int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp,int
return(0); return(0);
}*/ }*/
int32_t iguana_bundlefinalize(struct iguana_info *coin,struct iguana_bundle *bp,struct OS_memspace *mem,struct OS_memspace *memB) int32_t iguana_bundlefinalize(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_bundle *bp,struct OS_memspace *mem,struct OS_memspace *memB)
{ {
int32_t i; struct iguana_bundle *tmpbp; int32_t i; struct iguana_bundle *tmpbp;
if ( iguana_bundleready(coin,bp,0) == bp->n ) if ( iguana_bundleready(coin,bp,0) == bp->n )
@ -996,7 +996,7 @@ int32_t iguana_bundlefinalize(struct iguana_info *coin,struct iguana_bundle *bp,
{ {
sleep(1); // make sure new incoming packet didnt overwrite sleep(1); // make sure new incoming packet didnt overwrite
coin->emitbusy++; coin->emitbusy++;
if ( iguana_bundlesaveHT(coin,mem,memB,bp,(uint32_t)time(NULL)) == 0 ) if ( iguana_bundlesaveHT(myinfo,coin,mem,memB,bp,(uint32_t)time(NULL)) == 0 )
{ {
//fprintf(stderr,"emitQ done coin.%p bp.[%d] ht.%d\n",coin,bp->hdrsi,bp->bundleheight); //fprintf(stderr,"emitQ done coin.%p bp.[%d] ht.%d\n",coin,bp->hdrsi,bp->bundleheight);
bp->emitfinish = (uint32_t)time(NULL) + 1; bp->emitfinish = (uint32_t)time(NULL) + 1;
@ -1038,7 +1038,7 @@ int32_t iguana_bundlefinalize(struct iguana_info *coin,struct iguana_bundle *bp,
return(0); return(0);
} }
int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,struct OS_memspace *memB,struct iguana_bundle *bp,int32_t timelimit,int32_t lag) int32_t iguana_bundleiters(struct supernet_info *myinfo,struct iguana_info *coin,struct OS_memspace *mem,struct OS_memspace *memB,struct iguana_bundle *bp,int32_t timelimit,int32_t lag)
{ {
int32_t range,starti,lasti,retval=0,max,counter = 0; struct iguana_bundle *currentbp,*lastbp; int32_t range,starti,lasti,retval=0,max,counter = 0; struct iguana_bundle *currentbp,*lastbp;
if ( coin->started == 0 || coin->active == 0 ) if ( coin->started == 0 || coin->active == 0 )
@ -1065,7 +1065,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
iguana_bundlehdr(coin,bp,starti); iguana_bundlehdr(coin,bp,starti);
else if ( bp->emitfinish == 0 && bp->numsaved >= bp->n ) else if ( bp->emitfinish == 0 && bp->numsaved >= bp->n )
{ {
if ( coin->virtualchain != 0 || iguana_bundlefinalize(coin,bp,mem,memB) > 0 ) if ( coin->virtualchain != 0 || iguana_bundlefinalize(myinfo,coin,bp,mem,memB) > 0 )
return(0); return(0);
//else printf("bundlefinalize not done.[%d]\n",bp->hdrsi); //else printf("bundlefinalize not done.[%d]\n",bp->hdrsi);
retval = 1; retval = 1;

42
iguana/iguana_ramchain.c

@ -333,8 +333,7 @@ uint32_t iguana_ramchain_addunspent20(struct iguana_info *coin,struct iguana_pee
//portable_mutex_unlock(&mutex); //portable_mutex_unlock(&mutex);
#endif #endif
} }
else else printf("addr.%p unspent error fp.%p\n",addr,addr!=0?addr->voutsfp:0);
printf("addr.%p unspent error fp.%p\n",addr,addr!=0?addr->voutsfp:0);
} }
} }
u->txidind = ramchain->H.txidind; u->txidind = ramchain->H.txidind;
@ -438,7 +437,6 @@ uint32_t iguana_ramchain_addspend(struct iguana_info *coin,RAMCHAIN_FUNC,bits256
struct iguana_spend *s; struct iguana_kvitem *ptr = 0; bits256 txid; uint32_t spendind,unspentind,txidind=0,pkind,external=0; uint64_t value = 0; struct iguana_ramchaindata *rdata; struct iguana_spend *s; struct iguana_kvitem *ptr = 0; bits256 txid; uint32_t spendind,unspentind,txidind=0,pkind,external=0; uint64_t value = 0; struct iguana_ramchaindata *rdata;
if ( (rdata= ramchain->H.data) == 0 ) if ( (rdata= ramchain->H.data) == 0 )
return(0); return(0);
// uint8_t _script[IGUANA_MAXSCRIPTSIZE]; int32_t metalen,i,checklen;
spendind = ramchain->H.spendind++; spendind = ramchain->H.spendind++;
s = &Sx[spendind]; s = &Sx[spendind];
pkind = unspentind = 0; pkind = unspentind = 0;
@ -1625,10 +1623,10 @@ int32_t iguana_ramchain_cmp(struct iguana_ramchain *A,struct iguana_ramchain *B,
return(-1); return(-1);
} }
int32_t iguana_ramchain_iterate(struct iguana_info *coin,struct iguana_ramchain *dest,struct iguana_ramchain *ramchain,struct iguana_bundle *bp,int16_t bundlei) int32_t iguana_ramchain_iterate(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_ramchain *dest,struct iguana_ramchain *ramchain,struct iguana_bundle *bp,int16_t bundlei)
{ {
RAMCHAIN_DECLARE; RAMCHAIN_DESTDECLARE; RAMCHAIN_DECLARE; RAMCHAIN_DESTDECLARE;
int32_t j,hdrsi,prevout,scriptlen; uint32_t sequenceid,destspendind=0,desttxidind=0; uint16_t fileid; uint64_t scriptpos; int32_t j,hdrsi,prevout,scriptlen; uint32_t unspentind,sequenceid,destspendind=0,desttxidind=0; uint16_t fileid; uint64_t scriptpos; int64_t crypto777_payment = 0;
bits256 prevhash; uint64_t value; uint8_t type; struct iguana_unspent *u; bits256 prevhash; uint64_t value; uint8_t type; struct iguana_unspent *u;
struct iguana_txid *tx; struct iguana_ramchaindata *rdata; uint8_t rmd160[20]; struct iguana_txid *tx; struct iguana_ramchaindata *rdata; uint8_t rmd160[20];
//if ( dest != 0 ) //if ( dest != 0 )
@ -1639,7 +1637,11 @@ int32_t iguana_ramchain_iterate(struct iguana_info *coin,struct iguana_ramchain
return(-1); return(-1);
} }
if ( dest != 0 ) if ( dest != 0 )
{
_iguana_ramchain_setptrs(RAMCHAIN_DESTPTRS,dest->H.data); _iguana_ramchain_setptrs(RAMCHAIN_DESTPTRS,dest->H.data);
if ( dest->expanded != 0 )
iguana_opreturn(myinfo,coin,bp,0,bp->bundleheight + bundlei,(((uint64_t)bp->hdrsi << 32) | dest->H.unspentind),0,0,0,0);
}
//fprintf(stderr,"iterate %d/%d dest.%p ramchain.%p rdata.%p\n",bp->bundleheight,bp->n,dest,ramchain,rdata); //fprintf(stderr,"iterate %d/%d dest.%p ramchain.%p rdata.%p\n",bp->bundleheight,bp->n,dest,ramchain,rdata);
_iguana_ramchain_setptrs(RAMCHAIN_PTRS,rdata); _iguana_ramchain_setptrs(RAMCHAIN_PTRS,rdata);
ramchain->H.ROflag = 1; ramchain->H.ROflag = 1;
@ -1698,8 +1700,14 @@ int32_t iguana_ramchain_iterate(struct iguana_info *coin,struct iguana_ramchain
scriptdata = iguana_ramchain_scriptdecode(&metalen,&scriptlen,Kspace,type,_script,u->scriptoffset,P[u->pkind].pubkeyoffset < ramchain->H.scriptoffset ? P[u->pkind].pubkeyoffset : 0); scriptdata = iguana_ramchain_scriptdecode(&metalen,&scriptlen,Kspace,type,_script,u->scriptoffset,P[u->pkind].pubkeyoffset < ramchain->H.scriptoffset ? P[u->pkind].pubkeyoffset : 0);
}*/ }*/
//fprintf(stderr,"iter add %p[%d] type.%d\n",scriptdata,scriptlen,type); //fprintf(stderr,"iter add %p[%d] type.%d\n",scriptdata,scriptlen,type);
if ( iguana_ramchain_addunspent(coin,RAMCHAIN_ARG,value,hdrsi,rmd160,j,type,fileid,(uint32_t)scriptpos,scriptlen,ramchain->H.txidind-rdata->firsti) == 0 ) if ( (unspentind= iguana_ramchain_addunspent(coin,RAMCHAIN_ARG,value,hdrsi,rmd160,j,type,fileid,(uint32_t)scriptpos,scriptlen,ramchain->H.txidind-rdata->firsti)) == 0 )
return(-3); return(-3);
if ( memcmp(rmd160,CRYPTO777_RMD160,sizeof(rmd160)) == 0 )
crypto777_payment += value;
else if ( type == IGUANA_SCRIPT_OPRETURN )
{
iguana_opreturn(myinfo,coin,bp,crypto777_payment,bp->bundleheight + bundlei,(((uint64_t)bp->hdrsi << 32) | unspentind),0,fileid,scriptpos,scriptlen);
}
} }
} }
else else
@ -1723,7 +1731,7 @@ int32_t iguana_ramchain_iterate(struct iguana_info *coin,struct iguana_ramchain
printf("%02x",scriptdata[i]); printf("%02x",scriptdata[i]);
fprintf(stderr," raw unspent script type.%d U%d offset.%d\n",type,ramchain->H.unspentind,U[ramchain->H.unspentind].scriptoffset); fprintf(stderr," raw unspent script type.%d U%d offset.%d\n",type,ramchain->H.unspentind,U[ramchain->H.unspentind].scriptoffset);
} //else printf("no script\n");*/ } //else printf("no script\n");*/
if ( iguana_ramchain_addunspent20(coin,0,RAMCHAIN_ARG,value,0,scriptlen,tx->txid,j,type,bp,rmd160) == 0 ) if ( (unspentind= iguana_ramchain_addunspent20(coin,0,RAMCHAIN_ARG,value,0,scriptlen,tx->txid,j,type,bp,rmd160)) == 0 )
return(-4); return(-4);
if ( 0 ) if ( 0 )
{ {
@ -2176,7 +2184,7 @@ void iguana_bundlemapfree(struct iguana_info *coin,struct OS_memspace *mem,struc
iguana_mempurge(hashmem); iguana_mempurge(hashmem);
} }
int32_t iguana_ramchain_expandedsave(struct iguana_info *coin,RAMCHAIN_FUNC,struct iguana_ramchain *newchain,struct OS_memspace *hashmem,int32_t cmpflag,struct iguana_bundle *bp) int32_t iguana_ramchain_expandedsave(struct supernet_info *myinfo,struct iguana_info *coin,RAMCHAIN_FUNC,struct iguana_ramchain *newchain,struct OS_memspace *hashmem,int32_t cmpflag,struct iguana_bundle *bp)
{ {
static const bits256 zero; static const bits256 zero;
bits256 firsthash2; int32_t err,bundlei,hdrsi,numblocks,firsti,height,retval= -1; struct iguana_ramchain checkR,*mapchain; char fname[1024]; struct iguana_block *block; uint32_t scriptspace,scriptoffset,stacksize; uint8_t *destoffset,*srcoffset; struct iguana_ramchaindata *rdata; bits256 firsthash2; int32_t err,bundlei,hdrsi,numblocks,firsti,height,retval= -1; struct iguana_ramchain checkR,*mapchain; char fname[1024]; struct iguana_block *block; uint32_t scriptspace,scriptoffset,stacksize; uint8_t *destoffset,*srcoffset; struct iguana_ramchaindata *rdata;
@ -2209,7 +2217,7 @@ int32_t iguana_ramchain_expandedsave(struct iguana_info *coin,RAMCHAIN_FUNC,stru
memset(ramchain->A,0,sizeof(*ramchain->A) * rdata->numpkinds); memset(ramchain->A,0,sizeof(*ramchain->A) * rdata->numpkinds);
//printf("presave T.%d U.%d S.%d P.%d X.%d -> size.%ld firsti.%d\n",rdata->numtxids,rdata->numunspents,rdata->numspends,rdata->numpkinds,rdata->numexternaltxids,(long)rdata->allocsize,firsti); //printf("presave T.%d U.%d S.%d P.%d X.%d -> size.%ld firsti.%d\n",rdata->numtxids,rdata->numunspents,rdata->numspends,rdata->numpkinds,rdata->numexternaltxids,(long)rdata->allocsize,firsti);
//printf("0 preSAVE: Koffset.%d scriptoffset.%d stacksize.%d allocsize.%d\n",(int32_t)rdata->Koffset,ramchain->H.scriptoffset,ramchain->H.stacksize,(int32_t)rdata->allocsize); //printf("0 preSAVE: Koffset.%d scriptoffset.%d stacksize.%d allocsize.%d\n",(int32_t)rdata->Koffset,ramchain->H.scriptoffset,ramchain->H.stacksize,(int32_t)rdata->allocsize);
if ( (err= iguana_ramchain_iterate(coin,0,ramchain,bp,-1)) != 0 ) if ( (err= iguana_ramchain_iterate(myinfo,coin,0,ramchain,bp,-1)) != 0 )
printf("ERROR.%d iterating presave ramchain hdrsi.%d\n",err,hdrsi); printf("ERROR.%d iterating presave ramchain hdrsi.%d\n",err,hdrsi);
else else
{ {
@ -2244,7 +2252,7 @@ int32_t iguana_ramchain_expandedsave(struct iguana_info *coin,RAMCHAIN_FUNC,stru
iguana_ramchain_link(mapchain,firsthash2,hdrsi,height,0,numblocks,firsti,1); iguana_ramchain_link(mapchain,firsthash2,hdrsi,height,0,numblocks,firsti,1);
iguana_ramchain_extras(coin,mapchain,hashmem,0); iguana_ramchain_extras(coin,mapchain,hashmem,0);
//printf("expSAVE: Koffset.%d scriptoffset.%d stacksize.%d allocsize.%d\n",(int32_t)mapchain->H.data->Koffset,mapchain->H.scriptoffset,mapchain->H.stacksize,(int32_t)mapchain->H.data->allocsize); //printf("expSAVE: Koffset.%d scriptoffset.%d stacksize.%d allocsize.%d\n",(int32_t)mapchain->H.data->Koffset,mapchain->H.scriptoffset,mapchain->H.stacksize,(int32_t)mapchain->H.data->allocsize);
if ( (err= iguana_ramchain_iterate(coin,0,mapchain,bp,bundlei)) != 0 ) if ( (err= iguana_ramchain_iterate(myinfo,coin,0,mapchain,bp,bundlei)) != 0 )
printf("err.%d iterate mapped dest\n",err); printf("err.%d iterate mapped dest\n",err);
else if ( cmpflag != 0 ) else if ( cmpflag != 0 )
{ {
@ -2430,7 +2438,7 @@ int32_t iguana_mapchaininit(char *fname,struct iguana_info *coin,struct iguana_r
} }
// helper threads: NUM_HELPERS // helper threads: NUM_HELPERS
int32_t iguana_bundlesaveHT(struct iguana_info *coin,struct OS_memspace *mem,struct OS_memspace *memB,struct iguana_bundle *bp,uint32_t starttime) // helper thread int32_t iguana_bundlesaveHT(struct supernet_info *myinfo,struct iguana_info *coin,struct OS_memspace *mem,struct OS_memspace *memB,struct iguana_bundle *bp,uint32_t starttime) // helper thread
{ {
static int depth; static const bits256 zero; static int depth; static const bits256 zero;
RAMCHAIN_DESTDECLARE; RAMCHAIN_DECLARE; RAMCHAIN_ZEROES; RAMCHAIN_DESTDECLARE; RAMCHAIN_DECLARE; RAMCHAIN_ZEROES;
@ -2563,7 +2571,7 @@ int32_t iguana_bundlesaveHT(struct iguana_info *coin,struct OS_memspace *mem,str
iguana_blockzcopyRO(coin->chain->zcash,destB,bundlei,&block->RO,0); iguana_blockzcopyRO(coin->chain->zcash,destB,bundlei,&block->RO,0);
//destB[bundlei] = block->RO; //destB[bundlei] = block->RO;
//fprintf(stderr,"(%d %d).%d ",R[bundlei].H.data->numtxids,dest->H.txidind,bundlei); //fprintf(stderr,"(%d %d).%d ",R[bundlei].H.data->numtxids,dest->H.txidind,bundlei);
if ( (err= iguana_ramchain_iterate(coin,dest,&R[bundlei],bp,bundlei)) != 0 ) if ( (err= iguana_ramchain_iterate(myinfo,coin,dest,&R[bundlei],bp,bundlei)) != 0 )
{ {
if ( (block= bp->blocks[bundlei]) != 0 ) if ( (block= bp->blocks[bundlei]) != 0 )
{ {
@ -2590,7 +2598,7 @@ int32_t iguana_bundlesaveHT(struct iguana_info *coin,struct OS_memspace *mem,str
//printf(" about to save dest scriptoffset.%d stacksize.%d data scriptspace.%d\n",dest->H.scriptoffset,dest->H.stacksize,dest->H.data->scriptspace); //printf(" about to save dest scriptoffset.%d stacksize.%d data scriptspace.%d\n",dest->H.scriptoffset,dest->H.stacksize,dest->H.data->scriptspace);
depth--; depth--;
memset(&newchain,0,sizeof(newchain)); memset(&newchain,0,sizeof(newchain));
if ( bundlei == endi+1 && iguana_ramchain_expandedsave(coin,RAMCHAIN_DESTARG,&newchain,&HASHMEM,0,bp) == 0 ) if ( bundlei == endi+1 && iguana_ramchain_expandedsave(myinfo,coin,RAMCHAIN_DESTARG,&newchain,&HASHMEM,0,bp) == 0 )
{ {
//char str[65]; printf("d.%d ht.%d %s saved lag.%d elapsed.%ld\n",depth,dest->height,mbstr(str,dest->H.data->allocsize),now-starttime,time(NULL)-now); //char str[65]; printf("d.%d ht.%d %s saved lag.%d elapsed.%ld\n",depth,dest->height,mbstr(str,dest->H.data->allocsize),now-starttime,time(NULL)-now);
retval = 0; retval = 0;
@ -2638,7 +2646,7 @@ void iguana_mergefree(struct iguana_info *coin,struct OS_memspace *mem,struct ig
iguana_mempurge(hashmemB); iguana_mempurge(hashmemB);
} }
int32_t iguana_bundlemergeHT(char *fname,struct iguana_info *coin,struct OS_memspace *mem,struct OS_memspace *memB,struct iguana_bundle *bp,struct iguana_bundle *nextbp,uint32_t starttime) int32_t iguana_bundlemergeHT(struct supernet_info *myinfo,char *fname,struct iguana_info *coin,struct OS_memspace *mem,struct OS_memspace *memB,struct iguana_bundle *bp,struct iguana_bundle *nextbp,uint32_t starttime)
{ {
static int32_t depth; static const bits256 zero; static int32_t depth; static const bits256 zero;
RAMCHAIN_DESTDECLARE; struct OS_memspace HASHMEM,HASHMEMA,HASHMEMB; RAMCHAIN_DESTDECLARE; struct OS_memspace HASHMEM,HASHMEMA,HASHMEMB;
@ -2679,11 +2687,11 @@ int32_t iguana_bundlemergeHT(char *fname,struct iguana_info *coin,struct OS_mems
iguana_ramchain_extras(coin,dest,&HASHMEM,0); iguana_ramchain_extras(coin,dest,&HASHMEM,0);
dest->H.txidind = dest->H.unspentind = dest->H.spendind = dest->pkind = dest->H.data->firsti; dest->H.txidind = dest->H.unspentind = dest->H.spendind = dest->pkind = dest->H.data->firsti;
dest->externalind = 0; dest->externalind = 0;
if ( (err= iguana_ramchain_iterate(coin,dest,A,bp,-1)) != 0 ) if ( (err= iguana_ramchain_iterate(myinfo,coin,dest,A,bp,-1)) != 0 )
printf("error.%d ramchain_iterate A.%d\n",err,A->height); printf("error.%d ramchain_iterate A.%d\n",err,A->height);
else if ( (err= iguana_ramchain_iterate(coin,dest,B,nextbp,-1)) != 0 ) else if ( (err= iguana_ramchain_iterate(myinfo,coin,dest,B,nextbp,-1)) != 0 )
printf("error.%d ramchain_iterate B.%d\n",err,B->height); printf("error.%d ramchain_iterate B.%d\n",err,B->height);
else if ( iguana_ramchain_expandedsave(coin,RAMCHAIN_DESTARG,&newchain,&HASHMEM,0,0) == 0 ) else if ( iguana_ramchain_expandedsave(myinfo,coin,RAMCHAIN_DESTARG,&newchain,&HASHMEM,0,0) == 0 )
{ {
printf("merging isnt setup to save the blockROs\n"); printf("merging isnt setup to save the blockROs\n");
printf("depth.%d ht.%d fsize.%s MERGED %d[%d] and %d[%d] lag.%d elapsed.%ld bp.%d -> %d\n",depth,dest->height,mbstr(str,dest->H.data->allocsize),A->height,A->numblocks,B->height,B->numblocks,now-starttime,time(NULL)-now,bp->bundleheight,nextbp->bundleheight); printf("depth.%d ht.%d fsize.%s MERGED %d[%d] and %d[%d] lag.%d elapsed.%ld bp.%d -> %d\n",depth,dest->height,mbstr(str,dest->H.data->allocsize),A->height,A->numblocks,B->height,B->numblocks,now-starttime,time(NULL)-now,bp->bundleheight,nextbp->bundleheight);

8
iguana/iguana_realtime.c

@ -41,7 +41,7 @@ void iguana_RTramchainfree(struct iguana_info *coin,struct iguana_bundle *bp)
} }
} }
void *iguana_ramchainfile(struct iguana_info *coin,struct iguana_ramchain *dest,struct iguana_ramchain *R,struct iguana_bundle *bp,int32_t bundlei,struct iguana_block *block) void *iguana_ramchainfile(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_ramchain *dest,struct iguana_ramchain *R,struct iguana_bundle *bp,int32_t bundlei,struct iguana_block *block)
{ {
char fname[1024]; long filesize; int32_t err; void *ptr=0; char fname[1024]; long filesize; int32_t err; void *ptr=0;
if ( block == bp->blocks[bundlei] && (ptr= iguana_bundlefile(coin,fname,&filesize,bp,bundlei)) != 0 ) if ( block == bp->blocks[bundlei] && (ptr= iguana_bundlefile(coin,fname,&filesize,bp,bundlei)) != 0 )
@ -49,7 +49,7 @@ void *iguana_ramchainfile(struct iguana_info *coin,struct iguana_ramchain *dest,
if ( iguana_mapchaininit(fname,coin,R,bp,bundlei,block,ptr,filesize) >= 0 ) if ( iguana_mapchaininit(fname,coin,R,bp,bundlei,block,ptr,filesize) >= 0 )
{ {
if ( dest != 0 && dest->H.data != 0 ) if ( dest != 0 && dest->H.data != 0 )
err = iguana_ramchain_iterate(coin,dest,R,bp,bundlei); err = iguana_ramchain_iterate(myinfo,coin,dest,R,bp,bundlei);
else err = 0; else err = 0;
if ( err != 0 || dest->H.data == 0 || bits256_cmp(R->H.data->firsthash2,block->RO.hash2) != 0 ) if ( err != 0 || dest->H.data == 0 || bits256_cmp(R->H.data->firsthash2,block->RO.hash2) != 0 )
{ {
@ -202,7 +202,7 @@ void iguana_RTspendvectors(struct iguana_info *coin,struct iguana_bundle *bp)
} }
} }
int32_t iguana_realtime_update(struct iguana_info *coin) int32_t iguana_realtime_update(struct supernet_info *myinfo,struct iguana_info *coin)
{ {
double startmillis0; static double totalmillis0; static int32_t num0; double startmillis0; static double totalmillis0; static int32_t num0;
struct iguana_bundle *bp; struct iguana_ramchaindata *rdata; int32_t offset,bundlei,i,n,flag=0; bits256 hash2,*ptr; struct iguana_peer *addr; struct iguana_bundle *bp; struct iguana_ramchaindata *rdata; int32_t offset,bundlei,i,n,flag=0; bits256 hash2,*ptr; struct iguana_peer *addr;
@ -303,7 +303,7 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
{ {
iguana_blocksetcounters(coin,block,dest); iguana_blocksetcounters(coin,block,dest);
startmillis0 = OS_milliseconds(); startmillis0 = OS_milliseconds();
if ( coin->RTdatabad == 0 && iguana_ramchainfile(coin,dest,&blockR,bp,bundlei,block) == 0 ) if ( coin->RTdatabad == 0 && iguana_ramchainfile(myinfo,coin,dest,&blockR,bp,bundlei,block) == 0 )
{ {
for (i=0; i<bp->n; i++) for (i=0; i<bp->n; i++)
if ( GETBIT(bp->haveblock,i) == 0 ) if ( GETBIT(bp->haveblock,i) == 0 )

4
iguana/iguana_recv.c

@ -668,7 +668,7 @@ int32_t iguana_bundlehashadd(struct iguana_info *coin,struct iguana_bundle *bp,i
if ( firstflag != 0 && bp->emitfinish == 0 ) if ( firstflag != 0 && bp->emitfinish == 0 )
{ {
//block->fpos = -1; //block->fpos = -1;
if ( 0 && iguana_ramchainfile(coin,0,&blockR,bp,bundlei,block) == 0 ) if ( 0 && iguana_ramchainfile(SuperNET_MYINFO(0),coin,0,&blockR,bp,bundlei,block) == 0 )
{ {
size = sizeof(blockR); size = sizeof(blockR);
iguana_ramchain_free(coin,&blockR,1); iguana_ramchain_free(coin,&blockR,1);
@ -1672,7 +1672,7 @@ int32_t iguana_processrecv(struct supernet_info *myinfo,struct iguana_info *coin
{ {
for (i=0; i<coin->chain->bundlesize; i++) for (i=0; i<coin->chain->bundlesize; i++)
{ {
if ( coin->RTdatabad != 0 || iguana_realtime_update(coin) <= 0 ) if ( coin->RTdatabad != 0 || iguana_realtime_update(myinfo,coin) <= 0 )
break; break;
} }
} }

1
iguana/main.c

@ -1432,6 +1432,7 @@ void iguana_main(void *arg)
printf("LITTLE ENDIAN arg.%p\n",arg); printf("LITTLE ENDIAN arg.%p\n",arg);
else printf("ENDIAN ERROR\n"); else printf("ENDIAN ERROR\n");
mycalloc(0,0,0); mycalloc(0,0,0);
decode_hex(CRYPTO777_RMD160,20,"");
if ( 0 ) if ( 0 )
iguana_signalsinit(); iguana_signalsinit();
if ( 0 ) if ( 0 )

16
includes/iguana_funcs.h

@ -168,8 +168,8 @@ int32_t iguana_helpertask(FILE *fp,struct OS_memspace *mem,struct OS_memspace *m
void iguana_flushQ(struct iguana_info *coin,struct iguana_peer *addr); void iguana_flushQ(struct iguana_info *coin,struct iguana_peer *addr);
//struct iguana_txdatabits iguana_peerfilePT(struct iguana_info *coin,struct iguana_peer *addr,bits256 hash2,struct iguana_txdatabits txdatabits,int32_t recvlen); //struct iguana_txdatabits iguana_peerfilePT(struct iguana_info *coin,struct iguana_peer *addr,bits256 hash2,struct iguana_txdatabits txdatabits,int32_t recvlen);
struct iguana_txdatabits iguana_calctxidbits(uint32_t addrind,uint32_t filecount,uint32_t fpos,uint32_t datalen); struct iguana_txdatabits iguana_calctxidbits(uint32_t addrind,uint32_t filecount,uint32_t fpos,uint32_t datalen);
int32_t iguana_bundlesaveHT(struct iguana_info *coin,struct OS_memspace *mem,struct OS_memspace *memB,struct iguana_bundle *bp,uint32_t starttime); // helper thread int32_t iguana_bundlesaveHT(struct supernet_info *myinfo,struct iguana_info *coin,struct OS_memspace *mem,struct OS_memspace *memB,struct iguana_bundle *bp,uint32_t starttime); // helper thread
int32_t iguana_bundlemergeHT(char *fname,struct iguana_info *coin,struct OS_memspace *mem,struct OS_memspace *memB,struct iguana_bundle *bp,struct iguana_bundle *nextbp,uint32_t starttime); // helper thread int32_t iguana_bundlemergeHT(struct supernet_info *myinfo,char *fname,struct iguana_info *coin,struct OS_memspace *mem,struct OS_memspace *memB,struct iguana_bundle *bp,struct iguana_bundle *nextbp,uint32_t starttime); // helper thread
void iguana_peerfilename(struct iguana_info *coin,char *fname,uint32_t addrind,uint32_t filecount); void iguana_peerfilename(struct iguana_info *coin,char *fname,uint32_t addrind,uint32_t filecount);
@ -266,7 +266,7 @@ int32_t is_bitcoinrpc(struct supernet_info *myinfo,char *method,char *remoteaddr
char *iguana_bitcoinRPC(struct supernet_info *myinfo,char *method,cJSON *json,char *remoteaddr,uint16_t port); char *iguana_bitcoinRPC(struct supernet_info *myinfo,char *method,cJSON *json,char *remoteaddr,uint16_t port);
cJSON *iguana_pubkeyjson(struct iguana_info *coin,char *pubkeystr); cJSON *iguana_pubkeyjson(struct iguana_info *coin,char *pubkeystr);
void iguana_bundleQ(struct iguana_info *coin,struct iguana_bundle *bp,int32_t timelimit); void iguana_bundleQ(struct iguana_info *coin,struct iguana_bundle *bp,int32_t timelimit);
int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,struct OS_memspace *memB,struct iguana_bundle *bp,int32_t timelimit,int32_t lag); int32_t iguana_bundleiters(struct supernet_info *myinfo,struct iguana_info *coin,struct OS_memspace *mem,struct OS_memspace *memB,struct iguana_bundle *bp,int32_t timelimit,int32_t lag);
void ramcoder_test(void *data,int64_t len); void ramcoder_test(void *data,int64_t len);
void iguana_exit(); void iguana_exit();
int32_t iguana_pendingaccept(struct iguana_info *coin); int32_t iguana_pendingaccept(struct iguana_info *coin);
@ -341,7 +341,7 @@ int32_t iguana_sendblockreqPT(struct iguana_info *coin,struct iguana_peer *addr,
int32_t iguana_blockreq(struct iguana_info *coin,int32_t height,int32_t priority); int32_t iguana_blockreq(struct iguana_info *coin,int32_t height,int32_t priority);
int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp,int32_t lag); int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp,int32_t lag);
int32_t iguana_ramchain_prefetch(struct iguana_info *coin,struct iguana_ramchain *ramchain,int32_t txonly); int32_t iguana_ramchain_prefetch(struct iguana_info *coin,struct iguana_ramchain *ramchain,int32_t txonly);
int32_t iguana_realtime_update(struct iguana_info *coin); int32_t iguana_realtime_update(struct supernet_info *myinfo,struct iguana_info *coin);
int32_t iguana_volatilesmap(struct iguana_info *coin,struct iguana_ramchain *ramchain); int32_t iguana_volatilesmap(struct iguana_info *coin,struct iguana_ramchain *ramchain);
void iguana_volatilespurge(struct iguana_info *coin,struct iguana_ramchain *ramchain); void iguana_volatilespurge(struct iguana_info *coin,struct iguana_ramchain *ramchain);
int32_t iguana_volatilesinit(struct iguana_info *coin); int32_t iguana_volatilesinit(struct iguana_info *coin);
@ -349,7 +349,7 @@ void iguana_initfinal(struct iguana_info *coin,bits256 lastbundle);
int64_t iguana_ramchainopen(char *fname,struct iguana_info *coin,struct iguana_ramchain *ramchain,struct OS_memspace *mem,struct OS_memspace *hashmem,int32_t bundleheight,bits256 hash2); int64_t iguana_ramchainopen(char *fname,struct iguana_info *coin,struct iguana_ramchain *ramchain,struct OS_memspace *mem,struct OS_memspace *hashmem,int32_t bundleheight,bits256 hash2);
int32_t iguana_ramchain_free(struct iguana_info *coin,struct iguana_ramchain *ramchain,int32_t deleteflag); int32_t iguana_ramchain_free(struct iguana_info *coin,struct iguana_ramchain *ramchain,int32_t deleteflag);
void iguana_blocksetcounters(struct iguana_info *coin,struct iguana_block *block,struct iguana_ramchain * ramchain); void iguana_blocksetcounters(struct iguana_info *coin,struct iguana_block *block,struct iguana_ramchain * ramchain);
int32_t iguana_ramchain_iterate(struct iguana_info *coin,struct iguana_ramchain *dest,struct iguana_ramchain *ramchain,struct iguana_bundle *bp,int16_t bundlei); int32_t iguana_ramchain_iterate(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_ramchain *dest,struct iguana_ramchain *ramchain,struct iguana_bundle *bp,int16_t bundlei);
void *iguana_bundlefile(struct iguana_info *coin,char *fname,long *filesizep,struct iguana_bundle *bp,int32_t bundlei); void *iguana_bundlefile(struct iguana_info *coin,char *fname,long *filesizep,struct iguana_bundle *bp,int32_t bundlei);
int32_t iguana_mapchaininit(char *fname,struct iguana_info *coin,struct iguana_ramchain *mapchain,struct iguana_bundle *bp,int32_t bundlei,struct iguana_block *block,void *ptr,long filesize); int32_t iguana_mapchaininit(char *fname,struct iguana_info *coin,struct iguana_ramchain *mapchain,struct iguana_bundle *bp,int32_t bundlei,struct iguana_block *block,void *ptr,long filesize);
void iguana_autoextend(struct iguana_info *coin,struct iguana_bundle *bp); void iguana_autoextend(struct iguana_info *coin,struct iguana_bundle *bp);
@ -368,7 +368,7 @@ void iguana_walletlock(struct supernet_info *myinfo,struct iguana_info *coin);
int32_t _SuperNET_encryptjson(char *destfname,char *passphrase,int32_t passsize,char *fname2fa,int32_t fnamesize,cJSON *argjson); int32_t _SuperNET_encryptjson(char *destfname,char *passphrase,int32_t passsize,char *fname2fa,int32_t fnamesize,cJSON *argjson);
int32_t bitcoin_pubkeylen(const uint8_t *pubkey); int32_t bitcoin_pubkeylen(const uint8_t *pubkey);
struct iguana_block *iguana_bundleblock(struct iguana_info *coin,bits256 *hash2p,struct iguana_bundle *bp,int32_t i); struct iguana_block *iguana_bundleblock(struct iguana_info *coin,bits256 *hash2p,struct iguana_bundle *bp,int32_t i);
void *iguana_ramchainfile(struct iguana_info *coin,struct iguana_ramchain *dest,struct iguana_ramchain *R,struct iguana_bundle *bp,int32_t bundlei,struct iguana_block *block); void *iguana_ramchainfile(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_ramchain *dest,struct iguana_ramchain *R,struct iguana_bundle *bp,int32_t bundlei,struct iguana_block *block);
int32_t iguana_bundlehashadd(struct iguana_info *coin,struct iguana_bundle *bp,int32_t bundlei,struct iguana_block *block); int32_t iguana_bundlehashadd(struct iguana_info *coin,struct iguana_bundle *bp,int32_t bundlei,struct iguana_block *block);
int32_t iguana_convert(struct iguana_info *coin,int32_t helperid,struct iguana_bundle *bp,int32_t RTflag,int32_t starti); int32_t iguana_convert(struct iguana_info *coin,int32_t helperid,struct iguana_bundle *bp,int32_t RTflag,int32_t starti);
int32_t iguana_bundleissuemissing(struct iguana_info *coin,struct iguana_bundle *bp,int32_t priority,double mult); int32_t iguana_bundleissuemissing(struct iguana_info *coin,struct iguana_bundle *bp,int32_t priority,double mult);
@ -502,7 +502,7 @@ char *SuperNET_parser(struct supernet_info *myinfo,char *agentstr,char *method,c
char *SuperNET_htmlstr(char *fname,char *htmlstr,int32_t maxsize,char *agentstr); char *SuperNET_htmlstr(char *fname,char *htmlstr,int32_t maxsize,char *agentstr);
void SuperNET_setkeys(struct supernet_info *myinfo,void *pass,int32_t passlen,int32_t dosha256); void SuperNET_setkeys(struct supernet_info *myinfo,void *pass,int32_t passlen,int32_t dosha256);
int32_t iguana_headerget(struct iguana_info *coin,uint8_t *serialized,int32_t maxsize,struct iguana_block *block); int32_t iguana_headerget(struct iguana_info *coin,uint8_t *serialized,int32_t maxsize,struct iguana_block *block);
int32_t iguana_bundlefinalize(struct iguana_info *coin,struct iguana_bundle *bp,struct OS_memspace *mem,struct OS_memspace *memB); int32_t iguana_bundlefinalize(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_bundle *bp,struct OS_memspace *mem,struct OS_memspace *memB);
bits256 iguana_parsetxobj(struct supernet_info *myinfo,struct iguana_info *coin,int32_t *txstartp,uint8_t *serialized,int32_t maxsize,struct iguana_msgtx *msg,cJSON *txobj,struct vin_info *V); bits256 iguana_parsetxobj(struct supernet_info *myinfo,struct iguana_info *coin,int32_t *txstartp,uint8_t *serialized,int32_t maxsize,struct iguana_msgtx *msg,cJSON *txobj,struct vin_info *V);
int32_t iguana_ROallocsize(struct iguana_info *virt); int32_t iguana_ROallocsize(struct iguana_info *virt);
long iguana_bundlesload(struct supernet_info *myinfo,struct iguana_info *coin); long iguana_bundlesload(struct supernet_info *myinfo,struct iguana_info *coin);
@ -519,6 +519,8 @@ struct iguana_peer *iguana_peerfindipaddr(struct iguana_info *coin,char *ipaddr,
struct iguana_peer *iguana_peerfindipbits(struct iguana_info *coin,uint32_t ipbits,int32_t needalive); struct iguana_peer *iguana_peerfindipbits(struct iguana_info *coin,uint32_t ipbits,int32_t needalive);
int32_t basilisk_relays_send(struct supernet_info *myinfo,struct iguana_peer *addr); int32_t basilisk_relays_send(struct supernet_info *myinfo,struct iguana_peer *addr);
int32_t basilisk_hashes_send(struct supernet_info *myinfo,struct iguana_info *virt,struct iguana_peer *addr,char *CMD,bits256 *txids,int32_t num); int32_t basilisk_hashes_send(struct supernet_info *myinfo,struct iguana_info *virt,struct iguana_peer *addr,char *CMD,bits256 *txids,int32_t num);
int32_t iguana_opreturn(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_bundle *bp,int64_t crypto777_payment,int32_t height,uint64_t hdrsi_unspentind,int64_t payment,uint32_t fileid,uint64_t scriptpos,uint32_t scriptlen);
int32_t iguana_scriptdata(struct iguana_info *coin,uint8_t *scriptspace,long fileptr[2],char *fname,uint64_t scriptpos,int32_t scriptlen);
#include "../includes/iguana_api.h" #include "../includes/iguana_api.h"

1
includes/iguana_globals.h

@ -74,6 +74,7 @@ CONDEXTERN char GLOBAL_HELPDIR[512];
CONDEXTERN char GLOBAL_VALIDATEDIR[512]; CONDEXTERN char GLOBAL_VALIDATEDIR[512];
CONDEXTERN char GLOBAL_CONFSDIR[512]; CONDEXTERN char GLOBAL_CONFSDIR[512];
CONDEXTERN int32_t IGUANA_NUMHELPERS; CONDEXTERN int32_t IGUANA_NUMHELPERS;
CONDEXTERN uint8_t CRYPTO777_RMD160[20];
#endif #endif

9
includes/iguana_structs.h

@ -413,7 +413,7 @@ struct iguana_info
struct iguana_hhutxo *utxotable; struct iguana_hhaccount *accountstable; char lastdispstr[2048]; struct iguana_hhutxo *utxotable; struct iguana_hhaccount *accountstable; char lastdispstr[2048];
double txidfind_totalmillis,txidfind_num,spendtxid_totalmillis,spendtxid_num; double txidfind_totalmillis,txidfind_num,spendtxid_totalmillis,spendtxid_num;
struct iguana_monitorinfo monitoring[256]; struct iguana_monitorinfo monitoring[256];
struct gecko_sequences SEQ; uint32_t dPoW_lasthdrsi,dPoW_lastunspentind;
struct iguana_blocks blocks; void *mempool; void *mempools[IGUANA_MAXRELAYS]; struct iguana_blocks blocks; void *mempool; void *mempools[IGUANA_MAXRELAYS];
}; };
@ -450,6 +450,12 @@ struct supernet_address
char NXTADDR[32],BTC[64],BTCD[64]; char NXTADDR[32],BTC[64],BTCD[64];
}; };
struct delayedPoW_info
{
struct gecko_sequences SEQ;
uint32_t lastbtc_hdrsi,lastbtc_unspentind,lastbtcd_hdrsi,lastbtcd_unspentind;
};
struct supernet_info struct supernet_info
{ {
struct supernet_address myaddr; struct supernet_address myaddr;
@ -468,6 +474,7 @@ struct supernet_info
void *ctx; void *ctx;
// compatibility // compatibility
bits256 pangea_category,instantdex_category; bits256 pangea_category,instantdex_category;
struct delayedPoW_info dPOW;
uint32_t relaybits[IGUANA_MAXRELAYS]; struct basilisk_relay relays[IGUANA_MAXRELAYS]; int32_t numrelays; uint32_t relaybits[IGUANA_MAXRELAYS]; struct basilisk_relay relays[IGUANA_MAXRELAYS]; int32_t numrelays;
}; };
#endif #endif

Loading…
Cancel
Save