diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index dfef0135f..43ce405f6 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -868,7 +868,7 @@ int32_t basilisk_issued_purge(struct supernet_info *myinfo,int32_t timepad) void basilisks_loop(void *arg) { static uint32_t counter; - struct iguana_info *relay; struct supernet_info *myinfo = arg; int32_t i,iter; double startmilli,endmilli; struct dpow_info *dp; + struct iguana_info *relay; struct supernet_info *myinfo = arg; int32_t iter; double startmilli,endmilli; struct dpow_info *dp; iter = 0; relay = iguana_coinfind("RELAY"); printf("start basilisk loop\n"); @@ -908,10 +908,10 @@ void basilisks_loop(void *arg) } if ( myinfo->expiration != 0 && (myinfo->dexsock >= 0 || myinfo->IAMLP != 0 || myinfo->DEXactive > time(NULL)) ) basilisk_requests_poll(myinfo); - printf("RELAYID.%d endmilli %f vs now %f\n",myinfo->NOTARY.RELAYID,endmilli,OS_milliseconds()); + //printf("RELAYID.%d endmilli %f vs now %f\n",myinfo->NOTARY.RELAYID,endmilli,OS_milliseconds()); while ( OS_milliseconds() < endmilli ) usleep(10000); - printf("finished waiting\n"); + //printf("finished waiting\n"); iter++; } } diff --git a/iguana/dpow/dpow_rpc.c b/iguana/dpow/dpow_rpc.c index 87cee802a..7338ebd6d 100755 --- a/iguana/dpow/dpow_rpc.c +++ b/iguana/dpow/dpow_rpc.c @@ -1001,7 +1001,7 @@ int32_t dpow_issuer_block(struct dpow_info *dp,struct iguana_info *coin,int32_t int32_t dpow_issuer_iteration(struct dpow_info *dp,struct iguana_info *coin,int32_t height,uint32_t *isrealtimep) { - char *retstr; int32_t i,kmdheight; cJSON *infoobj,*result; uint16_t port = coin->chain->rpcport; + char *retstr; int32_t i,currentheight=0; cJSON *infoobj,*result; uint16_t port = coin->chain->rpcport; if ( height <= 0 ) height = 1; *isrealtimep = 0; @@ -1009,9 +1009,9 @@ int32_t dpow_issuer_iteration(struct dpow_info *dp,struct iguana_info *coin,int3 { if ( (infoobj= cJSON_Parse(retstr)) != 0 ) { - if ( (result= jobj(infoobj,(char *)"result")) != 0 && (kmdheight= jint(result,(char *)"blocks")) != 0 ) + if ( (result= jobj(infoobj,(char *)"result")) != 0 && (currentheight= jint(result,(char *)"blocks")) != 0 ) { - for (i=0; i<1000 && height<=kmdheight; i++,height++) + for (i=0; i<30 && height<=currentheight; i++,height++) { /*fprintf(stderr,"%s.%d ",coin->symbol,height); if ( (height % 10) == 0 ) @@ -1028,7 +1028,7 @@ int32_t dpow_issuer_iteration(struct dpow_info *dp,struct iguana_info *coin,int3 } usleep(10000); } - if ( height >= kmdheight ) + if ( height >= currentheight ) *isrealtimep = (uint32_t)time(NULL); } free_json(infoobj); @@ -1038,7 +1038,7 @@ int32_t dpow_issuer_iteration(struct dpow_info *dp,struct iguana_info *coin,int3 } else { - //printf("error from %s\n",coin->symbol); + printf("error from %s height.%d currentheight.%d\n",coin->symbol,height,currentheight); usleep(100000); } return(height); diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index 54e55d184..b34ac7ff7 100755 --- a/iguana/iguana_notary.c +++ b/iguana/iguana_notary.c @@ -170,7 +170,7 @@ void iguana_dPoWupdate(struct supernet_info *myinfo,struct dpow_info *dp) { if ( strcmp(dp->dest,"KMD") == 0 ) { - fprintf(stderr,"[I"); + fprintf(stderr,"[I "); dp->SRCHEIGHT = dpow_issuer_iteration(dp,src,dp->SRCHEIGHT,&dp->SRCREALTIME); fprintf(stderr," %d] ",dp->SRCHEIGHT); }