From eac6e4b7dba7092ca86eb9a5713822f8b69ecc34 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 27 Nov 2016 17:45:17 -0300 Subject: [PATCH] test --- iguana/dPoW.h | 4 ++-- iguana/dpow/dpow_fsm.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/iguana/dPoW.h b/iguana/dPoW.h index 897139c69..b85235628 100755 --- a/iguana/dPoW.h +++ b/iguana/dPoW.h @@ -102,9 +102,9 @@ struct dpow_block struct dpow_entry notaries[DPOW_MAXRELAYS]; uint32_t state,starttime,timestamp,waiting,sigcrcs[2],txidcrcs[2],utxocrcs[2],lastepoch; int32_t rawratifiedlens[2],height,numnotaries,numerrors,completed,minsigs,duration,numratified,isratify,require0,scores[DPOW_MAXRELAYS]; - int8_t bestk,ratifybestk,pendingbestk,pendingratifybestk; + int8_t myind,bestk,ratifybestk,pendingbestk,pendingratifybestk; cJSON *ratified; - uint8_t myind,ratified_pubkeys[DPOW_MAXRELAYS][33],ratifysigs[2][DPOW_MAXSIGLEN],ratifysiglens[2]; + uint8_t ratified_pubkeys[DPOW_MAXRELAYS][33],ratifysigs[2][DPOW_MAXSIGLEN],ratifysiglens[2]; char handles[DPOW_MAXRELAYS][32]; char signedtx[32768]; uint8_t ratifyrawtx[2][32768]; uint32_t pendingcrcs[2]; }; diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index 4f543bb15..adb900046 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -169,7 +169,6 @@ void dpow_statemachinestart(void *ptr) jsonstr = ptrs[4]; kmdheight = -1; memcpy(&checkpoint,&ptrs[5],sizeof(checkpoint)); - printf("statemachinestart %s->%s %s ht.%d minsigs.%d duration.%d start.%u\n",dp->symbol,dp->dest,bits256_str(str,checkpoint.blockhash.hash),checkpoint.blockhash.height,minsigs,duration,checkpoint.timestamp); src = iguana_coinfind(dp->symbol); dest = iguana_coinfind(dp->dest); dpow_getchaintip(myinfo,&srchash,&srctime,dp->srctx,&dp->numsrctx,src); @@ -315,6 +314,8 @@ void dpow_statemachinestart(void *ptr) dp->ratifying -= bp->isratify; return; } + bp->myind = myind; + printf("[%d] statemachinestart %s->%s %s ht.%d minsigs.%d duration.%d start.%u\n",bp->myind,dp->symbol,dp->dest,bits256_str(str,checkpoint.blockhash.hash),checkpoint.blockhash.height,minsigs,duration,checkpoint.timestamp); if ( bp->isratify != 0 && memcmp(bp->notaries[0].pubkey,bp->ratified_pubkeys[0],33) != 0 ) { for (i=0; i<33; i++)