Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
a5bb31d70f
  1. 10
      basilisk/basilisk.c
  2. 2
      basilisk/basilisk_bitcoin.c
  3. 1
      iguana/iguana_realtime.c
  4. 2
      iguana/iguana_unspents.c

10
basilisk/basilisk.c

@ -776,7 +776,7 @@ void basilisk_requests_poll(struct supernet_info *myinfo)
void basilisks_loop(void *arg) void basilisks_loop(void *arg)
{ {
struct iguana_info *virt,*tmpcoin,*coin,*btcd; struct basilisk_message *msg,*tmpmsg; struct basilisk_item *tmp,*pending; uint32_t now; int32_t i,iter,maxmillis,flag=0; struct supernet_info *myinfo = arg; struct iguana_info *virt,*tmpcoin,*coin,*btcd; struct basilisk_message *msg,*tmpmsg; struct basilisk_item *tmp,*pending; uint32_t now; int32_t iter,maxmillis,flag=0; struct supernet_info *myinfo = arg;
iter = 0; iter = 0;
while ( 1 ) while ( 1 )
{ {
@ -813,10 +813,10 @@ void basilisks_loop(void *arg)
{ {
//if ( coin->RELAYNODE == 0 && coin->VALIDATENODE == 0 ) //if ( coin->RELAYNODE == 0 && coin->VALIDATENODE == 0 )
{ {
for (i=0; i<BASILISK_MAXRELAYS; i++) //for (i=0; i<BASILISK_MAXRELAYS; i++)
if ( coin->relay_RTheights[i] != 0 ) // if ( coin->relay_RTheights[i] != 0 )
break; // break;
if ( i == BASILISK_MAXRELAYS || (time(NULL) % 60) == 0 ) if ( (time(NULL) % 10) == 0 ) //i == BASILISK_MAXRELAYS ||
{ {
basilisk_unspents_update(myinfo,coin); basilisk_unspents_update(myinfo,coin);
} }

2
basilisk/basilisk_bitcoin.c

@ -1163,7 +1163,7 @@ void basilisk_unspents_update(struct supernet_info *myinfo,struct iguana_info *c
portable_mutex_lock(&myinfo->bu_mutex); portable_mutex_lock(&myinfo->bu_mutex);
if ( (retarray= cJSON_Parse(retstr)) != 0 ) if ( (retarray= cJSON_Parse(retstr)) != 0 )
{ {
printf("%s UNSPENTS_UPDATE.(%s)\n",coin->symbol,retstr); //printf("%s UNSPENTS_UPDATE.(%s)\n",coin->symbol,retstr);
if ( jobj(retarray,"error") == 0 ) if ( jobj(retarray,"error") == 0 )
{ {
if ( (jstr(retarray,"ipaddr") == 0 || strcmp(jstr(retarray,"ipaddr"),myinfo->ipaddr) != 0) && (n= cJSON_GetArraySize(retarray)) > 0 ) if ( (jstr(retarray,"ipaddr") == 0 || strcmp(jstr(retarray,"ipaddr"),myinfo->ipaddr) != 0) && (n= cJSON_GetArraySize(retarray)) > 0 )

1
iguana/iguana_realtime.c

@ -729,6 +729,7 @@ void *iguana_RTrawdata(struct iguana_info *coin,bits256 hash2,uint8_t *data,int3
} }
//printf("len.%d filesize.%ld\n",len,filesize); //printf("len.%d filesize.%ld\n",len,filesize);
fclose(fp); fclose(fp);
OS_removefile(fname,0);
} }
else if ( checkonly == 0 ) else if ( checkonly == 0 )
{ {

2
iguana/iguana_unspents.c

@ -970,7 +970,7 @@ int64_t iguana_utxoaddrtablefind(struct iguana_info *coin,int16_t search_hdrsi,u
} }
//printf("ind.%04x no [%d] p%u after num.%d\n",ind,search_hdrsi,search_pkind,num); //printf("ind.%04x no [%d] p%u after num.%d\n",ind,search_hdrsi,search_pkind,num);
} }
return(-1); return(0);
} }
struct iguana_utxoaddr *iguana_utxoaddrfind(int32_t createflag,struct iguana_info *coin,int16_t hdrsi,uint32_t pkind,uint8_t rmd160[20],struct iguana_utxoaddr **prevp) struct iguana_utxoaddr *iguana_utxoaddrfind(int32_t createflag,struct iguana_info *coin,int16_t hdrsi,uint32_t pkind,uint8_t rmd160[20],struct iguana_utxoaddr **prevp)

Loading…
Cancel
Save