jl777 7 years ago
parent
commit
bffc419fb0
  1. 20
      basilisk/basilisk.c
  2. 4
      iguana/iguana_notary.c

20
basilisk/basilisk.c

@ -931,20 +931,20 @@ void basilisks_loop(void *arg)
relay = iguana_coinfind("RELAY");
startmilli = OS_milliseconds();
endmilli = startmilli + 1000;
fprintf(stderr,"A ");
//fprintf(stderr,"A ");
basilisk_issued_purge(myinfo,600000);
fprintf(stderr,"B ");
//fprintf(stderr,"B ");
basilisk_p2pQ_process(myinfo,777);
fprintf(stderr,"C ");
//fprintf(stderr,"C ");
if ( myinfo->IAMNOTARY != 0 )
{
if ( relay != 0 )
{
fprintf(stderr,"D ");
//fprintf(stderr,"D ");
basilisk_ping_send(myinfo,relay);
}
counter++;
fprintf(stderr,"E ");
//fprintf(stderr,"E ");
if ( myinfo->numdpows == 1 )
{
iguana_dPoWupdate(myinfo,&myinfo->DPOWS[0]);
@ -961,11 +961,11 @@ fprintf(stderr,"E ");
}
endmilli = startmilli + 30;
}
fprintf(stderr,"F ");
//fprintf(stderr,"F ");
}
else
{
fprintf(stderr,"G ");
//fprintf(stderr,"G ");
dex_updateclient(myinfo);
if ( myinfo->IAMLP != 0 )
endmilli = startmilli + 500;
@ -973,15 +973,15 @@ fprintf(stderr,"G ");
}
if ( myinfo->expiration != 0 && (myinfo->dexsock >= 0 || myinfo->IAMLP != 0 || myinfo->DEXactive > time(NULL)) )
{
fprintf(stderr,"H ");
//fprintf(stderr,"H ");
for (i=0; i<100; i++)
if ( basilisk_requests_poll(myinfo) <= 0 )
break;
}
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 )
usleep(10000);
printf("finished waiting numdpow.%d\n",myinfo->numdpows);
//printf("finished waiting numdpow.%d\n",myinfo->numdpows);
iter++;
}
}

4
iguana/iguana_notary.c

@ -201,13 +201,13 @@ void iguana_dPoWupdate(struct supernet_info *myinfo,struct dpow_info *dp)
//if ( strcmp(dp->symbol,"KMD") == 0 )
{
num = dpow_nanomsg_update(myinfo);
fprintf(stderr,"nano.%d ",num);
//fprintf(stderr,"nano.%d ",num);
}
src = iguana_coinfind(dp->symbol);
dest = iguana_coinfind(dp->dest);
if ( src != 0 && dest != 0 )
{
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:"");
dp->numdesttx = sizeof(dp->desttx)/sizeof(*dp->desttx);
if ( (height= dpow_getchaintip(myinfo,&merkleroot,&blockhash,&blocktime,dp->desttx,&dp->numdesttx,dest)) != dp->destchaintip.blockhash.height && height >= 0 )
{

Loading…
Cancel
Save