From ff3087baf8fee116602f7666ddecf49b3bd2e85f Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 8 Oct 2016 08:59:43 -0300 Subject: [PATCH] test --- iguana/iguana_notary.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index bf723e69a..abf639942 100755 --- a/iguana/iguana_notary.c +++ b/iguana/iguana_notary.c @@ -731,7 +731,7 @@ void dpow_statemachinestart(void *ptr) void dpow_fifoupdate(struct supernet_info *myinfo,struct dpow_checkpoint *fifo,struct dpow_checkpoint tip) { - int32_t i; struct dpow_checkpoint newfifo[DPOW_FIFOSIZE]; + int32_t i; struct dpow_checkpoint newfifo[DPOW_FIFOSIZE]; char str[65]; memset(newfifo,0,sizeof(newfifo)); for (i=DPOW_FIFOSIZE-1; i>0; i--) { @@ -746,7 +746,7 @@ void dpow_fifoupdate(struct supernet_info *myinfo,struct dpow_checkpoint *fifo,s memcpy(fifo,newfifo,sizeof(newfifo)); for (i=0; iDPOW; + int32_t height; char str[65]; uint32_t blocktime; bits256 blockhash; struct iguana_info *src,*dest; struct dpow_info *dp = &myinfo->DPOW; if ( strcmp(dp->symbol,"KMD") == 0 ) { strcpy(dp->dest,DPOW_BTCSTR); @@ -848,7 +848,7 @@ void iguana_dPoWupdate(struct supernet_info *myinfo) dp->numdesttx = sizeof(dp->desttx)/sizeof(*dp->desttx); if ( (height= dpow_getchaintip(myinfo,&blockhash,&blocktime,dp->desttx,&dp->numdesttx,dest)) != dp->destchaintip.blockhash.height && height >= 0 ) { - printf("%s got height.%d vs last.%d\n",dp->dest,height,dp->destchaintip.blockhash.height); + printf("%s %s height.%d vs last.%d\n",dp->dest,bits256_str(str,blockhash),height,dp->destchaintip.blockhash.height); if ( height <= dp->destchaintip.blockhash.height ) { printf("iguana_dPoWupdate dest.%s reorg detected %d vs %d\n",dp->dest,height,dp->destchaintip.blockhash.height); @@ -859,7 +859,7 @@ void iguana_dPoWupdate(struct supernet_info *myinfo) dp->numsrctx = sizeof(dp->srctx)/sizeof(*dp->srctx); if ( (height= dpow_getchaintip(myinfo,&blockhash,&blocktime,dp->srctx,&dp->numsrctx,src)) != dp->last.blockhash.height && height >= 0 ) { - printf("%s got height.%d vs last.%d\n",dp->symbol,height,dp->last.blockhash.height); + printf("%s %s height.%d vs last.%d\n",dp->symbol,bits256_str(str,blockhash),height,dp->last.blockhash.height); if ( height < dp->last.blockhash.height ) { printf("iguana_dPoWupdate src.%s reorg detected %d vs %d approved.%d notarized.%d\n",dp->symbol,height,dp->last.blockhash.height,dp->approved[0].height,dp->notarized[0].height);