diff --git a/iguana/dPoW.h b/iguana/dPoW.h index 5c6ec39d5..5f24e5d43 100755 --- a/iguana/dPoW.h +++ b/iguana/dPoW.h @@ -122,8 +122,8 @@ struct dpow_info struct dpow_checkpoint checkpoint,last,destchaintip,srcfifo[DPOW_FIFOSIZE],destfifo[DPOW_FIFOSIZE]; struct dpow_hashheight approved[DPOW_FIFOSIZE],notarized[DPOW_FIFOSIZE]; bits256 srctx[DPOW_MAXTX],desttx[DPOW_MAXTX]; - uint32_t KMDREALTIME,destupdated,srcconfirms,numdesttx,numsrctx,lastsplit,cancelratify,crcs[16]; - int32_t maxblocks,KMDHEIGHT,SHORTFLAG; + uint32_t SRCREALTIME,destupdated,srcconfirms,numdesttx,numsrctx,lastsplit,cancelratify,crcs[16]; + int32_t maxblocks,SRCHEIGHT,SHORTFLAG; struct pax_transaction *PAX; portable_mutex_t mutex; struct dpow_block **blocks; diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index 969ffcf50..61025ff25 100755 --- a/iguana/iguana_notary.c +++ b/iguana/iguana_notary.c @@ -148,8 +148,6 @@ void iguana_dPoWupdate(struct supernet_info *myinfo,struct dpow_info *dp) dp->numdesttx = sizeof(dp->desttx)/sizeof(*dp->desttx); if ( (height= dpow_getchaintip(myinfo,&blockhash,&blocktime,dp->desttx,&dp->numdesttx,dest)) != dp->destchaintip.blockhash.height && height >= 0 ) { - if ( strcmp(dp->dest,"KMD") == 0 ) - dp->KMDHEIGHT = dpow_issuer_iteration(dp,dest,dp->KMDHEIGHT,&dp->KMDREALTIME); printf("%s %s height.%d vs last.%d\n",dp->dest,bits256_str(str,blockhash),height,dp->destchaintip.blockhash.height); if ( height <= dp->destchaintip.blockhash.height ) { @@ -161,6 +159,8 @@ void iguana_dPoWupdate(struct supernet_info *myinfo,struct dpow_info *dp) dp->numsrctx = sizeof(dp->srctx)/sizeof(*dp->srctx); if ( (height= dpow_getchaintip(myinfo,&blockhash,&blocktime,dp->srctx,&dp->numsrctx,src)) != dp->last.blockhash.height && height >= 0 ) { + if ( strcmp(dp->dest,"KMD") == 0 ) + dp->SRCHEIGHT = dpow_issuer_iteration(dp,src,dp->SRCHEIGHT,&dp->SRCREALTIME); printf("%s %s height.%d vs last.%d\n",dp->symbol,bits256_str(str,blockhash),height,dp->last.blockhash.height); if ( height < dp->last.blockhash.height ) {