This commit is contained in:
jl777
2016-11-20 15:12:55 -03:00
parent c10b348c33
commit ffbc2f0037
2 changed files with 5 additions and 2 deletions

View File

@@ -580,7 +580,10 @@ uint64_t komodo_accrued_interest(int32_t *txheightp,uint32_t *locktimep,uint256
int32_t komodo_isrealtime(int32_t *kmdheightp)
{
*kmdheightp = (int32_t)chainActive.Tip()->nHeight;
struct komodo_state *sp;
if ( (sp= komodo_stateptrget("KMD")) != 0 )
*kmdheightp = sp->CURRENT_HEIGHT;
else *kmdheightp = 0;
if ( *kmdheightp != 0 && *kmdheightp == (int32_t)komodo_longestchain() )
return(1);
else return(0);

View File

@@ -363,7 +363,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3
checktoshis = PAX_fiatdest(&seed,tokomodo,destaddr,pubkey33,coinaddr,kmdheight,base,value);
typestr = "withdraw";
printf("%s.height.%d vs height.%d check %.8f/%.8f vs %.8f tokomodo.%d %d seed.%llx -> (%s)\n",ASSETCHAINS_SYMBOL,kmdheight,height,dstr(checktoshis),dstr(komodoshis),dstr(value),komodo_is_issuer(),strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0,(long long)seed,coinaddr);
if ( (pax= komodo_paxfind(&space,txid,vout)) != 0 )
if ( (pax= komodo_paxfind(&space,txid,vout)) == 0 )
{
printf("notarize %s %.8f -> %.8f kmd.%d other.%d\n",ASSETCHAINS_SYMBOL,dstr(value),dstr(komodoshis),kmdheight,height);
} else printf(" %.8f -> %s withdraw already there\n",dstr(value),coinaddr);