Browse Source

test

olddPoW
jl777 8 years ago
parent
commit
a908f62809
  1. 2
      iguana/dPoW.h
  2. 5
      iguana/iguana_notary.c

2
iguana/dPoW.h

@ -35,7 +35,7 @@
#define DPOW_FIFOSIZE 64
#define DPOW_MAXTX 8192
#define DPOW_THIRDPARTY_CONFIRMS 10
#define DPOW_THIRDPARTY_CONFIRMS 1
#define DPOW_KOMODOCONFIRMS 3
#define DPOW_BTCCONFIRMS 1
#define DPOW_MAXRELAYS 64

5
iguana/iguana_notary.c

@ -58,12 +58,13 @@ 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;
void **ptrs; char str[65]; int32_t freq; struct dpow_checkpoint checkpoint;
dpow_checkpointset(myinfo,&dp->last,height,hash,timestamp,blocktime);
checkpoint = dp->srcfifo[dp->srcconfirms];
printf("%s srcupdate ht.%d destupdated.%u nonz.%d %s\n",dp->symbol,height,dp->destupdated,bits256_nonz(checkpoint.blockhash.hash),bits256_str(str,dp->last.blockhash.hash));
dpow_fifoupdate(myinfo,dp->srcfifo,dp->last);
if ( bits256_nonz(checkpoint.blockhash.hash) != 0 && (checkpoint.blockhash.height % DPOW_CHECKPOINTFREQ) == 0 )
freq = strcmp(dp->symbol,"KMD") == 0 ? DPOW_CHECKPOINTFREQ : 1;
if ( bits256_nonz(checkpoint.blockhash.hash) != 0 && (checkpoint.blockhash.height % freq) == 0 )
{
ptrs = calloc(1,sizeof(void *)*5 + sizeof(struct dpow_checkpoint));
ptrs[0] = (void *)myinfo;

Loading…
Cancel
Save