Browse Source

Test

etomic
jl777 8 years ago
parent
commit
b0184bbba6
  1. 2
      iguana/exchanges/LP_coins.c
  2. 6
      iguana/exchanges/LP_remember.c

2
iguana/exchanges/LP_coins.c

@ -237,7 +237,7 @@ int32_t LP_isdisabled(char *base,char *rel)
struct iguana_info *LP_coinfind(char *symbol) struct iguana_info *LP_coinfind(char *symbol)
{ {
struct iguana_info *coin,cdata; int32_t isPoS,longestchain = 1000000; uint16_t port; uint64_t txfee; double estimatedrate; uint8_t pubtype,p2shtype,wiftype; char *name,*assetname; struct iguana_info *coin,cdata; int32_t isPoS,longestchain = 1; uint16_t port; uint64_t txfee; double estimatedrate; uint8_t pubtype,p2shtype,wiftype; char *name,*assetname;
if ( (coin= LP_coinsearch(symbol)) != 0 ) if ( (coin= LP_coinsearch(symbol)) != 0 )
return(coin); return(coin);
if ( (port= LP_rpcport(symbol)) == 0 ) if ( (port= LP_rpcport(symbol)) == 0 )

6
iguana/exchanges/LP_remember.c

@ -532,17 +532,17 @@ cJSON *basilisk_remember(int64_t *KMDtotals,int64_t *BTCtotals,uint32_t requesti
{ {
if ( (sentobj= LP_gettx(symbol,txid)) == 0 ) if ( (sentobj= LP_gettx(symbol,txid)) == 0 )
{ {
//printf("%s %s ready to broadcast\n",symbol,bits256_str(str2,txid)); char str2[65]; printf("%s %s ready to broadcast\n",symbol,bits256_str(str2,txid));
} }
else else
{ {
struct iguana_info *coin; int32_t ht; uint32_t locktime,blocktime; struct iguana_info *coin; int32_t ht = -1; uint32_t locktime,blocktime;
checktxid = jbits256(sentobj,"txid"); checktxid = jbits256(sentobj,"txid");
if ( (coin= LP_coinfind(symbol)) != 0 && (ht= LP_txheight(&locktime,&blocktime,coin,txobj)) > 0 && ht > 0 ) if ( (coin= LP_coinfind(symbol)) != 0 && (ht= LP_txheight(&locktime,&blocktime,coin,txobj)) > 0 && ht > 0 )
{ {
if ( coin->firstrefht == 0 || ht < coin->firstrefht ) if ( coin->firstrefht == 0 || ht < coin->firstrefht )
coin->firstrefht = ht; coin->firstrefht = ht;
} } else printf("coin.%p ht.%d\n",coin,ht);
if ( bits256_nonz(checktxid) == 0 ) if ( bits256_nonz(checktxid) == 0 )
checktxid = jbits256(sentobj,"hash"); checktxid = jbits256(sentobj,"hash");
if ( bits256_cmp(checktxid,txid) == 0 ) if ( bits256_cmp(checktxid,txid) == 0 )

Loading…
Cancel
Save