|
|
@ -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));
|
|
|
@ -433,7 +438,7 @@ void dpow_statemachinestart(void *ptr) |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
printf("isratify.%d bestk.%d %llx sigs.%llx state machine ht.%d completed state.%x %s.%s %s.%s recvmask.%llx\n",bp->isratify,bp->bestk,(long long)bp->bestmask,(long long)(bp->bestk>=0?bp->destsigsmasks[bp->bestk]:0),bp->height,bp->state,dp->dest,bits256_str(str,bp->desttxid),dp->symbol,bits256_str(str2,bp->srctxid),(long long)bp->recvmask); |
|
|
|
printf("isratify.%d bestk.%d %llx sigs.%llx state machine ht.%d completed state.%x %s.%s %s.%s recvmask.%llx paxwdcrc.%x\n",bp->isratify,bp->bestk,(long long)bp->bestmask,(long long)(bp->bestk>=0?bp->destsigsmasks[bp->bestk]:0),bp->height,bp->state,dp->dest,bits256_str(str,bp->desttxid),dp->symbol,bits256_str(str2,bp->srctxid),(long long)bp->recvmask,bp->paxwdcrc); |
|
|
|
dp->lastrecvmask = bp->recvmask; |
|
|
|
dp->ratifying -= bp->isratify; |
|
|
|
free(ptr); |
|
|
|