Browse Source

test

etomic
jl777 8 years ago
parent
commit
3ca575908d
  1. 14
      basilisk/basilisk.c
  2. 2
      iguana/dpow/dpow_network.c
  3. 9
      iguana/iguana_notary.c

14
basilisk/basilisk.c

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

2
iguana/dpow/dpow_network.c

@ -1206,7 +1206,7 @@ int32_t dpow_nanomsg_update(struct supernet_info *myinfo)
break;
usleep(1000);
}*/
while ( (size= nn_recv(myinfo->dpowsock,&np,NN_MSG,0)) >= 0 && num < 100 )
while ( (size= nn_recv(myinfo->dpowsock,&np,NN_MSG,0)) >= 0 && num < 1000 )
{
if ( size > 0 )
{

9
iguana/iguana_notary.c

@ -144,16 +144,15 @@ void dpow_destupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t h
void iguana_dPoWupdate(struct supernet_info *myinfo,struct dpow_info *dp)
{
int32_t i,height,num; uint32_t blocktime; bits256 blockhash; struct iguana_info *src,*dest;
for (i=0; i<3; i++)
int32_t height,num; uint32_t blocktime; bits256 blockhash; struct iguana_info *src,*dest;
if ( strcmp(dp->symbol,"KMD") == 0 )
{
if ( (num= dpow_nanomsg_update(myinfo)) <= 0 )
break;
num = dpow_nanomsg_update(myinfo);
//fprintf(stderr,"%d ",num);
}
src = iguana_coinfind(dp->symbol);
dest = iguana_coinfind(dp->dest);
fprintf(stderr,"i.%d dp.%p dPoWupdate (%s -> %s)\n",i,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 )
{
dp->numdesttx = sizeof(dp->desttx)/sizeof(*dp->desttx);

Loading…
Cancel
Save