jl777 8 years ago
parent
commit
06a9043d9e
  1. 2
      iguana/dPoW.h
  2. 4
      iguana/dpow/dpow_fsm.c

2
iguana/dPoW.h

@ -99,7 +99,7 @@ struct dpow_block
uint64_t destsigsmasks[DPOW_MAXRELAYS],srcsigsmasks[DPOW_MAXRELAYS];
uint64_t recvmask,bestmask,ratifybestmask,ratifyrecvmask,pendingbestmask,pendingratifybestmask,ratifysigmasks[2];
struct dpow_entry notaries[DPOW_MAXRELAYS];
uint32_t state,timestamp,waiting,sigcrcs[2],txidcrcs[2],utxocrcs[2];
uint32_t state,starttime,timestamp,waiting,sigcrcs[2],txidcrcs[2],utxocrcs[2];
int32_t height,numnotaries,completed,minsigs,duration,numratified,isratify,require0,scores[DPOW_MAXRELAYS];
int8_t bestk,ratifybestk,pendingbestk,pendingratifybestk;
cJSON *ratified;

4
iguana/dpow/dpow_fsm.c

@ -135,7 +135,7 @@ int32_t dpow_datahandler(struct supernet_info *myinfo,struct dpow_info *dp,struc
if ( bp->state != 0xffffffff )
{
bp->srctxid = txid;
printf("set state COMPLETED %s.(%s) %s.(%s)\n",dp->symbol,bits256_str(str,bp->desttxid),dp->dest,bits256_str(str2,txid));
printf("set state elapsed %d COMPLETED %s.(%s) %s.(%s)\n",(int32_t)(time(NULL) - bp->starttime),dp->symbol,bits256_str(str,bp->desttxid),dp->dest,bits256_str(str2,txid));
bp->state = 0xffffffff;
}
}
@ -341,7 +341,7 @@ void dpow_statemachinestart(void *ptr)
sleep(1);
}
if ( bp->isratify == 0 || (starttime= checkpoint.timestamp) == 0 )
starttime = (uint32_t)time(NULL);
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);
for (i=0; i<sizeof(srchash); i++)
srchash.bytes[i] = dp->minerkey33[i+1];

Loading…
Cancel
Save