jl777 7 years ago
parent
commit
2f7ef7ef5f
  1. 4
      iguana/dpow/dpow_fsm.c
  2. 6
      iguana/iguana_notary.c

4
iguana/dpow/dpow_fsm.c

@ -262,10 +262,10 @@ bits256 dpow_calcMoM(uint32_t *MoMdepthp,struct supernet_info *myinfo,struct igu
blockhash = dpow_getblockhash(myinfo,coin,ht);
if ( (blockjson= dpow_getblock(myinfo,coin,blockhash)) != 0 )
{
if ( notht == 0 && dpow_hasnotarization(&notht,myinfo,coin,blockjson,ht) > 0 )
if ( breakht == 0 && dpow_hasnotarization(&notht,myinfo,coin,blockjson,ht) > 0 )
{
breakht = notht;
free_json(blockjson);
//free_json(blockjson);
//printf("%s has notarization at %d for breakht.%d\n",coin->symbol,ht,notht);
}
merkle = jbits256(blockjson,"merkleroot");

6
iguana/iguana_notary.c

@ -95,7 +95,7 @@ void dpow_srcupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t he
if ( height > 0 && blocktime > 0 )
{
dpow_checkpointset(myinfo,&dp->last,height,hash,timestamp,blocktime);
if ( strcmp("BEER",dp->symbol) == 0 )
if ( (0) &&strcmp("BEER",dp->symbol) == 0 )
printf("dynamic set %s/%s %s <- height.%d\n",dp->symbol,dp->dest,bits256_str(str,hash),height);
checkpoint = dp->last;
} else return;
@ -109,7 +109,7 @@ void dpow_srcupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t he
printf("lastnotarized.(%s) is current checkpoint, skip\n",bits256_str(str,dp->lastnotarized));
return;
}
if ( strcmp("BEER",dp->symbol) == 0 )
if ( (0) && strcmp("BEER",dp->symbol) == 0 )
printf("checkpoint.(%s) is not active and not lastnotarized\n",bits256_str(str,checkpoint.blockhash.hash));
} else return;
} else return;
@ -118,7 +118,7 @@ void dpow_srcupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t he
}
if ( bits256_nonz(checkpoint.blockhash.hash) != 0 && (checkpoint.blockhash.height % freq) == 0 )
{
if ( strcmp("BEER",dp->symbol) == 0 )
if ( (0) && strcmp("BEER",dp->symbol) == 0 )
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_heightfind(myinfo,dp,checkpoint.blockhash.height + 1000);
ptrs = calloc(1,sizeof(void *)*5 + sizeof(struct dpow_checkpoint) + sizeof(pthread_t));

Loading…
Cancel
Save