diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index de2fc4c34..32a3ffe0d 100755 --- a/iguana/dpow/dpow_network.c +++ b/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; inumnotaries; i++) printf("%d:%d%s ",wts[i],owts[i],wts[i]*owts[i]>median?"*":""); diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index e29b0a4d7..28b513c7f 100755 --- a/iguana/iguana_notary.c +++ b/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);