Browse Source

test

etomic
jl777 8 years ago
parent
commit
79026df124
  1. 20
      basilisk/basilisk.c
  2. 2
      iguana/dpow/dpow_rpc.c
  3. 7
      iguana/iguana_notary.c

20
basilisk/basilisk.c

@ -878,20 +878,20 @@ void basilisks_loop(void *arg)
relay = iguana_coinfind("RELAY"); relay = iguana_coinfind("RELAY");
startmilli = OS_milliseconds(); startmilli = OS_milliseconds();
endmilli = startmilli + 1000; endmilli = startmilli + 1000;
fprintf(stderr,"A "); //fprintf(stderr,"A ");
basilisk_issued_purge(myinfo,600000); basilisk_issued_purge(myinfo,600000);
fprintf(stderr,"B "); //fprintf(stderr,"B ");
basilisk_p2pQ_process(myinfo,777); basilisk_p2pQ_process(myinfo,777);
fprintf(stderr,"C "); //fprintf(stderr,"C ");
if ( myinfo->IAMNOTARY != 0 ) if ( myinfo->IAMNOTARY != 0 )
{ {
if ( relay != 0 ) if ( relay != 0 )
{ {
fprintf(stderr,"D "); //fprintf(stderr,"D ");
basilisk_ping_send(myinfo,relay); basilisk_ping_send(myinfo,relay);
} }
counter++; counter++;
fprintf(stderr,"E "); //fprintf(stderr,"E ");
if ( myinfo->numdpows == 1 ) if ( myinfo->numdpows == 1 )
{ {
iguana_dPoWupdate(myinfo,&myinfo->DPOWS[0]); iguana_dPoWupdate(myinfo,&myinfo->DPOWS[0]);
@ -903,7 +903,7 @@ void basilisks_loop(void *arg)
iguana_dPoWupdate(myinfo,dp); iguana_dPoWupdate(myinfo,dp);
if ( (counter % myinfo->numdpows) != 0 ) if ( (counter % myinfo->numdpows) != 0 )
{ {
fprintf(stderr,"F "); //fprintf(stderr,"F ");
iguana_dPoWupdate(myinfo,&myinfo->DPOWS[0]); iguana_dPoWupdate(myinfo,&myinfo->DPOWS[0]);
} }
endmilli = startmilli + 30; endmilli = startmilli + 30;
@ -911,7 +911,7 @@ void basilisks_loop(void *arg)
} }
else else
{ {
fprintf(stderr,"G "); //fprintf(stderr,"G ");
dex_updateclient(myinfo); dex_updateclient(myinfo);
if ( myinfo->IAMLP != 0 ) if ( myinfo->IAMLP != 0 )
endmilli = startmilli + 500; endmilli = startmilli + 500;
@ -919,13 +919,13 @@ void basilisks_loop(void *arg)
} }
if ( myinfo->expiration != 0 && (myinfo->dexsock >= 0 || myinfo->IAMLP != 0 || myinfo->DEXactive > time(NULL)) ) if ( myinfo->expiration != 0 && (myinfo->dexsock >= 0 || myinfo->IAMLP != 0 || myinfo->DEXactive > time(NULL)) )
{ {
fprintf(stderr,"H "); //fprintf(stderr,"H ");
basilisk_requests_poll(myinfo); basilisk_requests_poll(myinfo);
} }
printf("RELAYID.%d endmilli %f vs now %f\n",myinfo->NOTARY.RELAYID,endmilli,startmilli); //printf("RELAYID.%d endmilli %f vs now %f\n",myinfo->NOTARY.RELAYID,endmilli,startmilli);
while ( OS_milliseconds() < endmilli ) while ( OS_milliseconds() < endmilli )
usleep(10000); usleep(10000);
printf("finished waiting numdpow.%d\n",myinfo->numdpows); //printf("finished waiting numdpow.%d\n",myinfo->numdpows);
iter++; iter++;
} }
} }

2
iguana/dpow/dpow_rpc.c

@ -1011,7 +1011,7 @@ int32_t dpow_issuer_iteration(struct dpow_info *dp,struct iguana_info *coin,int3
{ {
if ( (result= jobj(infoobj,(char *)"result")) != 0 && (currentheight= jint(result,(char *)"blocks")) != 0 ) if ( (result= jobj(infoobj,(char *)"result")) != 0 && (currentheight= jint(result,(char *)"blocks")) != 0 )
{ {
for (i=0; i<30 && height<=currentheight; i++,height++) for (i=0; i<100 && height<=currentheight; i++,height++)
{ {
/*fprintf(stderr,"%s.%d ",coin->symbol,height); /*fprintf(stderr,"%s.%d ",coin->symbol,height);
if ( (height % 10) == 0 ) if ( (height % 10) == 0 )

7
iguana/iguana_notary.c

@ -152,7 +152,7 @@ void iguana_dPoWupdate(struct supernet_info *myinfo,struct dpow_info *dp)
} }
src = iguana_coinfind(dp->symbol); src = iguana_coinfind(dp->symbol);
dest = iguana_coinfind(dp->dest); dest = iguana_coinfind(dp->dest);
fprintf(stderr,"dp.%p dPoWupdate (%s -> %s)\n",dp,dp!=0?dp->symbol:"",dp!=0?dp->dest:""); //fprintf(stderr,"dp.%p dPoWupdate (%s -> %s)\n",dp,dp!=0?dp->symbol:"",dp!=0?dp->dest:"");
if ( src != 0 && dest != 0 ) if ( src != 0 && dest != 0 )
{ {
dp->numdesttx = sizeof(dp->desttx)/sizeof(*dp->desttx); dp->numdesttx = sizeof(dp->desttx)/sizeof(*dp->desttx);
@ -171,9 +171,9 @@ void iguana_dPoWupdate(struct supernet_info *myinfo,struct dpow_info *dp)
{ {
if ( strcmp(dp->dest,"KMD") == 0 ) if ( strcmp(dp->dest,"KMD") == 0 )
{ {
fprintf(stderr,"[I "); //fprintf(stderr,"[I ");
dp->SRCHEIGHT = dpow_issuer_iteration(dp,src,dp->SRCHEIGHT,&dp->SRCREALTIME); dp->SRCHEIGHT = dpow_issuer_iteration(dp,src,dp->SRCHEIGHT,&dp->SRCREALTIME);
fprintf(stderr," %d] ",dp->SRCHEIGHT); //fprintf(stderr," %d] ",dp->SRCHEIGHT);
} }
char str[65]; printf("[%s].%d %s %s height.%d vs last.%d\n",dp->dest,dp->SRCHEIGHT,dp->symbol,bits256_str(str,blockhash),height,dp->last.blockhash.height); char str[65]; printf("[%s].%d %s %s height.%d vs last.%d\n",dp->dest,dp->SRCHEIGHT,dp->symbol,bits256_str(str,blockhash),height,dp->last.blockhash.height);
if ( dp->lastheight == 0 ) if ( dp->lastheight == 0 )
@ -205,7 +205,6 @@ void iguana_dPoWupdate(struct supernet_info *myinfo,struct dpow_info *dp)
} }
} //else printf("error getchaintip for %s\n",dp->symbol); } //else printf("error getchaintip for %s\n",dp->symbol);
} else printf("iguana_dPoWupdate missing src.(%s) %p or dest.(%s) %p\n",dp->symbol,src,dp->dest,dest); } else printf("iguana_dPoWupdate missing src.(%s) %p or dest.(%s) %p\n",dp->symbol,src,dp->dest,dest);
fprintf(stderr,"done.%s\n",dp->symbol);
} }
void dpow_addresses() void dpow_addresses()

Loading…
Cancel
Save