Browse Source

test

etomic
jl777 8 years ago
parent
commit
2847900c7e
  1. 13
      iguana/dpow/dpow_fsm.c

13
iguana/dpow/dpow_fsm.c

@ -158,7 +158,7 @@ void dpow_statemachinestart(void *ptr)
{
void **ptrs = ptr;
struct supernet_info *myinfo; struct dpow_info *dp; struct dpow_checkpoint checkpoint;
int32_t i,j,ht,destprevvout0,srcprevvout0,numratified=0,kmdheight,myind = -1; uint8_t pubkeys[64][33]; cJSON *ratified=0,*item; struct iguana_info *src,*dest; char *jsonstr,*handle,*hexstr,str[65],str2[65],srcaddr[64],destaddr[64]; bits256 zero,srchash,destprevtxid0,srcprevtxid0; struct dpow_block *bp; struct dpow_entry *ep = 0; uint32_t duration,minsigs,starttime,srctime;
int32_t i,j,ht,extralen,destprevvout0,srcprevvout0,numratified=0,kmdheight,myind = -1; uint8_t extras[10000],pubkeys[64][33]; cJSON *ratified=0,*item; struct iguana_info *src,*dest; char *jsonstr,*handle,*hexstr,str[65],str2[65],srcaddr[64],destaddr[64]; bits256 zero,srchash,destprevtxid0,srcprevtxid0; struct dpow_block *bp; struct dpow_entry *ep = 0; uint32_t duration,minsigs,starttime,srctime;
memset(&zero,0,sizeof(zero));
srcprevtxid0 = destprevtxid0 = zero;
srcprevvout0 = destprevvout0 = -1;
@ -387,9 +387,14 @@ void dpow_statemachinestart(void *ptr)
}
sleep(1);
}
if ( bp->isratify == 0 || (starttime= checkpoint.timestamp) == 0 )
bp->starttime = starttime = (uint32_t)time(NULL);
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);
if ( bp->isratify == 0 )
{
if ( (starttime= checkpoint.timestamp) == 0 )
bp->starttime = starttime = (uint32_t)time(NULL);
extralen = dpow_paxpending(extras);
bp->paxwdcrc = bp->notaries[bp->myind].paxwdcrc = calc_crc32(0,extras,extralen);
}
printf("PAXWDCRC.%x myind.%d isratify.%d DPOW.%s statemachine checkpoint.%d %s start.%u\n",bp->paxwdcrc,bp->myind,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];
//printf("start utxosync start.%u %u\n",starttime,(uint32_t)time(NULL));

Loading…
Cancel
Save