From 27c01c8f890d98dadeaca3f89447f8c9ce8979a7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 27 Nov 2016 17:26:09 -0300 Subject: [PATCH] test --- iguana/dpow/dpow_fsm.c | 4 +++- iguana/iguana_notary.c | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index 411c40b8d..4f543bb15 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -190,6 +190,7 @@ void dpow_statemachinestart(void *ptr) bp->duration = duration; bp->srccoin = src; bp->destcoin = dest; + bp->myind = -1; bp->opret_symbol = dp->symbol; if ( jsonstr != 0 && (ratified= cJSON_Parse(jsonstr)) != 0 ) { @@ -305,6 +306,7 @@ void dpow_statemachinestart(void *ptr) dp->ratifying -= bp->isratify; return; } + printf("myind.%d\n",myind); } else { @@ -380,7 +382,7 @@ void dpow_statemachinestart(void *ptr) } if ( bp->isratify == 0 || (starttime= checkpoint.timestamp) == 0 ) bp->starttime = starttime = (uint32_t)time(NULL); - printf("isratify.%d DPOW.%s statemachine checkpoint.%d %s start.%u\n",bp->isratify,src->symbol,checkpoint.blockhash.height,bits256_str(str,checkpoint.blockhash.hash),checkpoint.timestamp); + printf("myind.%d isratify.%d DPOW.%s statemachine checkpoint.%d %s start.%u\n",bp->myind,bp->isratify,src->symbol,checkpoint.blockhash.height,bits256_str(str,checkpoint.blockhash.hash),checkpoint.timestamp); for (i=0; iminerkey33[i+1]; //printf("start utxosync start.%u %u\n",starttime,(uint32_t)time(NULL)); diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index a7c7a6d93..9ed4d49b1 100755 --- a/iguana/iguana_notary.c +++ b/iguana/iguana_notary.c @@ -60,7 +60,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; char str[65]; struct dpow_checkpoint checkpoint; int32_t freq,minsigs; uint8_t pubkeys[64][33]; + void **ptrs; char str[65]; struct dpow_checkpoint checkpoint; int32_t freq,minsigs; //uint8_t pubkeys[64][33]; dpow_checkpointset(myinfo,&dp->last,height,hash,timestamp,blocktime); checkpoint = dp->srcfifo[dp->srcconfirms]; if ( strcmp("BTC",dp->dest) == 0 ) @@ -71,9 +71,9 @@ void dpow_srcupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t he else { freq = 1; - minsigs = (komodo_notaries(dp->symbol,pubkeys,height) >> 1) + 1; - if ( minsigs < DPOW_MINSIGS ) - minsigs = DPOW_MINSIGS; + minsigs = 7;//(komodo_notaries(dp->symbol,pubkeys,height) >> 1) + 1; + //if ( minsigs < DPOW_MINSIGS ) + // minsigs = DPOW_MINSIGS; } printf("%s/%s src ht.%d dest.%u nonz.%d %s minsigs.%d\n",dp->symbol,dp->dest,checkpoint.blockhash.height,dp->destupdated,bits256_nonz(checkpoint.blockhash.hash),bits256_str(str,dp->last.blockhash.hash),minsigs); dpow_fifoupdate(myinfo,dp->srcfifo,dp->last);