From 770c611cebb89f6e2957fefe736816dec0b51b0c Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 31 Oct 2016 15:32:05 -0300 Subject: [PATCH] test --- iguana/iguana_notary.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index 96b919d1e..615642633 100755 --- a/iguana/iguana_notary.c +++ b/iguana/iguana_notary.c @@ -32,20 +32,20 @@ int32_t dpow_datahandler(struct supernet_info *myinfo,struct dpow_info *dp,uint3 void dpow_fifoupdate(struct supernet_info *myinfo,struct dpow_checkpoint *fifo,struct dpow_checkpoint tip) { - int32_t i,ind; struct dpow_checkpoint newfifo[DPOW_FIFOSIZE]; char str[65]; + int32_t i,ind; struct dpow_checkpoint newfifo[DPOW_FIFOSIZE]; //char str[65]; memset(newfifo,0,sizeof(newfifo)); for (i=DPOW_FIFOSIZE-1; i>0; i--) { - if ( bits256_nonz(fifo[i-1].blockhash.hash) != 0 && (tip.blockhash.height - fifo[i-1].blockhash.height) != i ) + if ( 0 && bits256_nonz(fifo[i-1].blockhash.hash) != 0 && (tip.blockhash.height - fifo[i-1].blockhash.height) != i ) printf("(%d != %d) ",(tip.blockhash.height - fifo[i-1].blockhash.height),i); if ( (ind= (tip.blockhash.height - fifo[i-1].blockhash.height)) >= 0 && ind < DPOW_FIFOSIZE ) newfifo[ind] = fifo[i-1]; } newfifo[0] = tip; memcpy(fifo,newfifo,sizeof(newfifo)); - for (i=0; ilast,height,hash,timestamp,blocktime); checkpoint = dp->srcfifo[dp->srcconfirms]; - printf("%s srcupdate ht.%d destupdated.%u nonz.%d %s\n",dp->symbol,height,dp->destupdated,bits256_nonz(checkpoint.blockhash.hash),bits256_str(str,dp->last.blockhash.hash)); + //printf("%s srcupdate ht.%d destupdated.%u nonz.%d %s\n",dp->symbol,height,dp->destupdated,bits256_nonz(checkpoint.blockhash.hash),bits256_str(str,dp->last.blockhash.hash)); dpow_fifoupdate(myinfo,dp->srcfifo,dp->last); freq = strcmp(dp->symbol,"KMD") == 0 ? DPOW_CHECKPOINTFREQ : 1; if ( bits256_nonz(checkpoint.blockhash.hash) != 0 && (checkpoint.blockhash.height % freq) == 0 )