diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index be5c899d9..2e2aec3ba 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -931,6 +931,7 @@ void basilisk_iteration(struct supernet_info *myinfo) void basilisks_loop(void *arg) { + static uint32_t counter; struct supernet_info *myinfo = arg; int32_t iter; double startmilli,endmilli; iter = 0; while ( 1 ) @@ -941,7 +942,8 @@ void basilisks_loop(void *arg) basilisk_p2pQ_process(myinfo,777); if ( myinfo->NOTARY.RELAYID >= 0 ) { - iguana_dPoWupdate(myinfo); + if ( (counter++ % 20) == 0 ) + iguana_dPoWupdate(myinfo); endmilli = startmilli + 500; } else if ( myinfo->IAMLP != 0 ) diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index 2abdd90e0..ab8c7f49e 100755 --- a/iguana/iguana_notary.c +++ b/iguana/iguana_notary.c @@ -32,7 +32,7 @@ bits256 dpow_getbestblockhash(struct supernet_info *myinfo,struct iguana_info *c { if ( (retstr= bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getbestblockhash","")) != 0 ) { - printf("%s getbestblockhash.(%s)\n",coin->symbol,retstr); + //printf("%s getbestblockhash.(%s)\n",coin->symbol,retstr); if ( is_hexstr(retstr,0) == sizeof(blockhash)*2 ) decode_hex(blockhash.bytes,sizeof(blockhash),retstr); free(retstr); @@ -251,6 +251,7 @@ int32_t dpow_haveutxo(struct supernet_info *myinfo,struct iguana_info *coin,bits } free_json(unspents); } + printf("%s haveutxo.%d\n",coin->symbol,haveutxo); return(haveutxo); } @@ -261,6 +262,7 @@ int32_t dpow_message_utxo(bits256 *hashmsgp,bits256 *txidp,int32_t *voutp,cJSON memset(txidp,0,sizeof(*txidp)); if ( (msgobj= jarray(&n,json,"messages")) != 0 ) { + printf("messages.(%s)\n",jprint(msgobj,0)); for (i=0; isymbol,jprint(txobj,0)); return(txobj); } @@ -454,6 +458,7 @@ int32_t dpow_k_masks_match(struct dpow_entry notaries[DPOW_MAXRELAYS],int32_t nu } } } + printf("matches.%d num.%d\n",matches,num); return(matches); } @@ -704,7 +709,7 @@ int32_t dpow_getchaintip(struct supernet_info *myinfo,bits256 *blockhashp,uint32 { for (i=0; isymbol,height,*blocktimep,n); + //printf("dpow_getchaintip %s ht.%d time.%u numtx.%d\n",coin->symbol,height,*blocktimep,n); *numtxp = n; } } else height = -1; @@ -738,6 +743,7 @@ void dpow_checkpointset(struct supernet_info *myinfo,struct dpow_checkpoint *che void dpow_srcupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t height,bits256 hash,uint32_t timestamp,uint32_t blocktime) { void **ptrs; + printf("%s srcupdate ht.%d\n",dp->symbol,height); dpow_checkpointset(myinfo,&dp->last,height,hash,timestamp,blocktime); dpow_fifoupdate(myinfo,dp->srcfifo,dp->last); if ( dp->destupdated != 0 && bits256_nonz(dp->srcfifo[dp->srcconfirms].blockhash.hash) != 0 ) @@ -789,6 +795,7 @@ void dpow_destconfirm(struct supernet_info *myinfo,struct dpow_info *dp,struct d void dpow_destupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t height,bits256 hash,uint32_t timestamp,uint32_t blocktime) { + printf("%s destupdate ht.%d\n",dp->dest,height); dp->destupdated = timestamp; dpow_checkpointset(myinfo,&dp->destchaintip,height,hash,timestamp,blocktime); dpow_approvedset(myinfo,dp,&dp->destchaintip,dp->desttx,dp->numdesttx);