From 3ca575908dc24e9cad050ce8aa6f83e68b175baf Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 7 Jan 2017 16:24:56 +0200 Subject: [PATCH] test --- basilisk/basilisk.c | 14 ++++++++++++++ iguana/dpow/dpow_network.c | 2 +- iguana/iguana_notary.c | 9 ++++----- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index a8cd19aad..b2e41a367 100755 --- a/basilisk/basilisk.c +++ b/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); diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index c40d7605f..aa803d1e8 100755 --- a/iguana/dpow/dpow_network.c +++ b/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 ) { diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index 81b260cff..d11e621dc 100755 --- a/iguana/iguana_notary.c +++ b/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);