Browse Source

test

acspeed
jl777 8 years ago
parent
commit
27c01c8f89
  1. 4
      iguana/dpow/dpow_fsm.c
  2. 8
      iguana/iguana_notary.c

4
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; i<sizeof(srchash); i++)
srchash.bytes[i] = dp->minerkey33[i+1];
//printf("start utxosync start.%u %u\n",starttime,(uint32_t)time(NULL));

8
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);

Loading…
Cancel
Save