From 31e168dfa13eae364ebe3fd90927f8e4b57effc0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 7 Nov 2016 19:43:46 -0300 Subject: [PATCH] test --- src/komodo.h | 2 +- src/komodo_gateway.h | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 97bbd83ef..85006cd37 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -191,7 +191,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar errs++; if ( fwrite(opretbuf,1,olen,fp) != olen ) errs++; - //printf("ht.%d R opret[%d]\n",height,olen); + printf("ht.%d R opret[%d]\n",height,olen); komodo_opreturn(height,opretvalue,opretbuf,olen,txhash,vout); } else if ( notarypubs != 0 && numnotaries > 0 ) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index e7a8587e0..b91617e86 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -108,7 +108,9 @@ void komodo_gateway_deposit(char *coinaddr,uint64_t value,int32_t shortflag,char pax->txid = txid; pax->vout = vout; HASH_ADD_KEYPTR(hh,PAX,&pax->txid,sizeof(pax->txid),pax); - //printf("[%s] ht.%d create pax.%p\n",ASSETCHAINS_SYMBOL,height,pax); + int32_t i; for (i=0; i<32; i++) + printf("%02x",((uint8_t *)&txid)[i]); + printf(" v.%d [%s] ht.%d create pax.%p\n",vout,ASSETCHAINS_SYMBOL,height,pax); } pthread_mutex_unlock(&komodo_mutex); if ( coinaddr != 0 ) @@ -295,13 +297,6 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 diff = -diff; if ( kmdheight <= height ) { - if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) - { - for (i=0; i= checktoshis || (seed == 0 && diff < .01) ) { if ( komodo_paxfind(&space,txid,vout) == 0 ) + { komodo_gateway_deposit(coinaddr,value,shortflag,base,fiatoshis,rmd160,txid,vout,kmdheight); + } else printf("duplicate deposit\n"); } } else // short @@ -340,19 +337,21 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { for (i=0; i 0 && shortflag == ASSETCHAINS_SHORTFLAG ) { for (i=0; i