Browse Source

Test

pass-iguana-arg
jl777 7 years ago
parent
commit
edc9b4e826
  1. 2
      iguana/dpow/dpow_network.c
  2. 9
      iguana/iguana_notary.c

2
iguana/dpow/dpow_network.c

@ -1537,7 +1537,7 @@ void dpow_bestconsensus(struct dpow_info *dp,struct dpow_block *bp)
bp->bestmatches = bestmatches;
bp->notaries[bp->myind].bestmask = bp->bestmask = masks[besti];
bp->notaries[bp->myind].bestk = bp->bestk = bestks[besti];
if ( 0 && bp->myind == 0 && strcmp("KMD",dp->symbol) == 0 )
if ( bp->myind == 0 && strcmp("CHIPS",dp->symbol) == 0 )
{
for (i=0; i<bp->numnotaries; i++)
printf("%d:%d%s ",wts[i],owts[i],wts[i]*owts[i]>median?"*":"");

9
iguana/iguana_notary.c

@ -269,13 +269,16 @@ void iguana_dPoWupdate(struct supernet_info *myinfo,struct dpow_info *dp)
blockhash = dpow_getblockhash(myinfo,src,dp->lastheight);
dpow_srcupdate(myinfo,dp,dp->lastheight++,blockhash,(uint32_t)time(NULL),blocktime);
}
dp->lastsrcupdate = (uint32_t)time(NULL);
}
else if ( time(NULL) > dp->lastsrcupdate+60 || height != dp->lastheight )
{
while ( dp->lastheight <= height )
{
blockhash = dpow_getblockhash(myinfo,src,dp->lastheight);
dpow_srcupdate(myinfo,dp,dp->lastheight++,blockhash,(uint32_t)time(NULL),blocktime);
}
dp->lastsrcupdate = (uint32_t)time(NULL);
dp->lastheight = height;
blockhash = dpow_getblockhash(myinfo,src,dp->lastheight);
dpow_srcupdate(myinfo,dp,dp->lastheight,blockhash,(uint32_t)time(NULL),blocktime);
}
} //else printf("error getchaintip for %s\n",dp->symbol);
} else printf("iguana_dPoWupdate missing src.(%s) %p or dest.(%s) %p\n",dp->symbol,src,dp->dest,dest);

Loading…
Cancel
Save