diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index f0b1b04a5..3e24f5288 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -570,7 +570,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 basesp->deposited += fiatoshis; didstats = 1; if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) - printf("########### %p deposited %s += %.8f kmdheight.%d %.8f\n",basesp,base,dstr(fiatoshis),kmdheight,dstr(value)); + printf("########### %p deposited %s += %.8f/%.8f kmdheight.%d/%d %.8f/%.8f\n",basesp,base,dstr(fiatoshis),dstr(pax->fiatoshis),kmdheight,pax->height,dstr(value),dstr(pax->komodoshis)); } } if ( didstats != 0 ) @@ -587,7 +587,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 basesp->issued += pax2->fiatoshis; pax2->didstats = 1; if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) - printf("########### %p issued %s += %.8f kmdheight.%d %.8f other.%d\n",basesp,base,dstr(pax->fiatoshis),pax->height,dstr(pax->komodoshis),pax->otherheight); + printf("########### %p issueda %s += %.8f kmdheight.%d %.8f other.%d\n",basesp,base,dstr(pax2->fiatoshis),pax2->height,dstr(pax2->komodoshis),pax2->otherheight); } } } @@ -598,6 +598,52 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 } } } + else if ( opretbuf[0] == 'I' ) + { + tokomodo = 0; + if ( strncmp((char *)"KMD",(char *)&opretbuf[opretlen-4],3) != 0 ) + { + if ( (n= komodo_issued_opreturn(base,txids,vouts,values,srcvalues,kmdheights,otherheights,baseids,rmd160s,opretbuf,opretlen,0)) > 0 ) + { + for (i=0; itype = opretbuf[0]; + strcpy(pax->source,(char *)&opretbuf[opretlen-4]); + if ( (pax2= komodo_paxfind(txids[i],vouts[i],'D')) != 0 ) + { + // realtime path? + pax->fiatoshis = pax2->fiatoshis; + pax->komodoshis = pax2->komodoshis; + pax->marked = pax2->marked = pax2->height; + if ( pax->didstats == 0 ) + { + if ( (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) + { + basesp->issued += pax->fiatoshis; + pax->didstats = 1; + if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) + printf("########### %p issuedb %s += %.8f kmdheight.%d %.8f other.%d\n",basesp,CURRENCIES[baseids[i]],dstr(pax->fiatoshis),pax->height,dstr(pax->komodoshis),pax->otherheight); + } + } + } + } + komodo_paxmark(height,txids[i],vouts[i],'D',height); + } + } else printf("opreturn none issued?\n"); + } + if ( strcmp(source,ASSETCHAINS_SYMBOL) == 0 ) + printf("source.%s opreturn[I] matches %s\n",source,(char *)&opretbuf[opretlen-4]); + } else if ( opretbuf[0] == 'W' && opretlen >= 38 ) { tokomodo = 1; @@ -692,51 +738,6 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 } //printf("extra.[%d] after %.8f\n",n,dstr(komodo_paxtotal())); } - else if ( opretbuf[0] == 'I' ) - { - tokomodo = 0; - if ( strncmp((char *)"KMD",(char *)&opretbuf[opretlen-4],3) != 0 ) - { - if ( (n= komodo_issued_opreturn(base,txids,vouts,values,srcvalues,kmdheights,otherheights,baseids,rmd160s,opretbuf,opretlen,0)) > 0 ) - { - for (i=0; itype = opretbuf[0]; - strcpy(pax->source,(char *)&opretbuf[opretlen-4]); - if ( (pax2= komodo_paxfind(txids[i],vouts[i],'D')) != 0 ) - { - // realtime path? - pax->fiatoshis = pax2->fiatoshis; - pax->komodoshis = pax2->komodoshis; - pax->marked = pax2->marked = pax2->height; - if ( pax->didstats == 0 ) - { - if ( (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) - { - basesp->issued += pax->fiatoshis; - pax->didstats = 1; - if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("########### %p issued %s += %.8f kmdheight.%d %.8f other.%d\n",basesp,CURRENCIES[baseids[i]],dstr(pax->fiatoshis),pax->height,dstr(pax->komodoshis),pax->otherheight); - } - } - } - } - komodo_paxmark(height,txids[i],vouts[i],'D',height); - } - } else printf("opreturn none issued?\n"); - } - printf("source.%s opreturn[I] matches %s\n",source,(char *)&opretbuf[opretlen-4]); - } else if ( opretbuf[0] == 'X' ) { tokomodo = 1;