From 061dd53777a6dd784147f5c6383793e20b2f5ef2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 20 Nov 2016 20:51:41 -0300 Subject: [PATCH] rest --- iguana/dpow/dpow_fsm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index 15fd1bd8c..45723bf4e 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -171,8 +171,9 @@ void dpow_statemachinestart(void *ptr) memcpy(&checkpoint,&ptrs[5],sizeof(checkpoint)); printf("statemachinestart %s->%s %s ht.%d minsigs.%d duration.%d start.%u\n",dp->symbol,dp->dest,bits256_str(str,checkpoint.blockhash.hash),checkpoint.blockhash.height,minsigs,duration,checkpoint.timestamp); src = iguana_coinfind(dp->symbol); - dpow_getchaintip(myinfo,&srchash,&srctime,dp->srctx,&dp->numsrctx,src); dest = iguana_coinfind(dp->dest); + dpow_getchaintip(myinfo,&srchash,&srctime,dp->srctx,&dp->numsrctx,src); + dpow_getchaintip(myinfo,&srchash,&srctime,dp->desttx,&dp->numdesttx,dest); if ( src == 0 || dest == 0 ) { printf("null coin ptr? (%s %p or %s %p)\n",dp->symbol,src,dp->dest,dest); @@ -268,9 +269,9 @@ void dpow_statemachinestart(void *ptr) bitcoin_address(destaddr,dest->chain->pubtype,dp->minerkey33,33); if ( kmdheight >= 0 ) { - ht = strcmp("KMD",src->symbol) == 0 ? kmdheight : bp->height; + ht = kmdheight;///strcmp("KMD",src->symbol) == 0 ? kmdheight : bp->height; if ( ht == 0 ) - ht = src->longestchain; + ht = strcmp("KMD",src->symbol) == 0 ? src->longestchain : dest->longestchain; bp->numnotaries = komodo_notaries(src->symbol,pubkeys,ht); for (i=0; inumnotaries; i++) {