From 7cced97fb91e24a8e7016d926ec04b5288e1e775 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 18 Feb 2019 05:08:49 -1100 Subject: [PATCH] +print --- src/cc/rogue_rpc.cpp | 5 +++-- src/komodo_bitcoind.h | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/cc/rogue_rpc.cpp b/src/cc/rogue_rpc.cpp index 46446a883..b5e669237 100644 --- a/src/cc/rogue_rpc.cpp +++ b/src/cc/rogue_rpc.cpp @@ -557,9 +557,9 @@ int32_t rogue_findbaton(struct CCcontract_info *cp,uint256 &playertxid,char **ke return(-4); else batonht = pindex->GetHeight(); batonvalue = batontx.vout[0].nValue; - printf("keystrokes[%d]\n",numkeys); + printf("batonht.%d keystrokes[%d]\n",batonht,numkeys); return(0); - } + } else fprintf(stderr,"couldnt find baton\n"); } } else fprintf(stderr,"findbaton opret error\n"); } @@ -837,6 +837,7 @@ char *rogue_extractgame(char *str,int32_t *numkeysp,std::vector &newdat if ( rogue_findbaton(cp,playertxid,&keystrokes,numkeys,regslot,playerdata,batontxid,batonvout,batonvalue,batonht,gametxid,gametx,maxplayers,rogueaddr,numplayers,symbol,pname) == 0 ) { UniValue obj; + fprintf(stderr,"calling gamefields\n"); seed = rogue_gamefields(obj,maxplayers,buyin,gametxid,rogueaddr); fprintf(stderr,"(%s) found baton %s numkeys.%d seed.%llu playerdata.%d\n",pname.size()!=0?pname.c_str():Rogue_pname.c_str(),batontxid.ToString().c_str(),numkeys,(long long)seed,(int32_t)playerdata.size()); memset(&P,0,sizeof(P)); diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 68250e6cf..6cc7dc427 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -1127,10 +1127,10 @@ uint64_t komodo_accrued_interest(int32_t *txheightp,uint32_t *locktimep,uint256 int32_t komodo_nextheight() { - CBlockIndex *pindex; int32_t ht,longest = komodo_longestchain(); - if ( (pindex= chainActive.LastTip()) != 0 && (ht= pindex->GetHeight()) >= longest ) + CBlockIndex *pindex; int32_t ht; + if ( (pindex= chainActive.LastTip()) != 0 && (ht= pindex->GetHeight()) > 0 ) return(ht+1); - else return(longest + 1); + else return(komodo_longestchain() + 1); } int32_t komodo_isrealtime(int32_t *kmdheightp)