Browse Source

Test

etomic
jl777 7 years ago
parent
commit
2c8b5abbe2
  1. 4
      iguana/exchanges/LP_rpc.c
  2. 2
      iguana/exchanges/LP_scan.c
  3. 2
      iguana/exchanges/LP_utxos.c

4
iguana/exchanges/LP_rpc.c

@ -255,10 +255,10 @@ cJSON *LP_gettx(char *symbol,bits256 txid)
len = (int32_t)strlen(hexstr+1) >> 1;
serialized = malloc(len);
decode_hex(serialized,len,hexstr+1);
printf("DATA.(%s)\n",hexstr+1);
//printf("DATA.(%s)\n",hexstr+1);
retjson = bitcoin_data2json(coin->taddr,coin->pubtype,coin->p2shtype,coin->isPoS,coin->height,&checktxid,&msgtx,extraspace,sizeof(extraspace),serialized,len,0,0);
free(serialized);
printf("TX.(%s) match.%d\n",jprint(retjson,0),bits256_cmp(txid,checktxid));
//printf("TX.(%s) match.%d\n",jprint(retjson,0),bits256_cmp(txid,checktxid));
return(retjson);
} else printf("non-hex tx.(%s)\n",hexstr);
return(cJSON_Parse("{\"error\":\"non hex transaction\"}"));

2
iguana/exchanges/LP_scan.c

@ -125,7 +125,7 @@ uint64_t LP_txinterestvalue(uint64_t *interestp,char *destaddr,struct iguana_inf
if ( n > 1 )
printf("LP_txinterestvalue warning: violation of 1 output assumption n.%d\n",n);
} else printf("LP_txinterestvalue no addresses found?\n");
//char str[65]; printf("%s %.8f <- %s.(%s) txobj.(%s)\n",destaddr,dstr(value),coin->symbol,bits256_str(str,txid),jprint(txobj,0));
char str[65]; printf("dest.(%s) %.8f <- %s.(%s) txobj.(%s)\n",destaddr,dstr(value),coin->symbol,bits256_str(str,txid),jprint(txobj,0));
free_json(txobj);
} //else { char str[65]; printf("null gettxout return %s/v%d\n",bits256_str(str,txid),vout); }
return(value);

2
iguana/exchanges/LP_utxos.c

@ -291,7 +291,7 @@ int32_t LP_iseligible(uint64_t *valp,uint64_t *val2p,int32_t iambob,char *symbol
//struct LP_utxoinfo *utxo;
uint64_t val,val2=0,txfee,threshold=0; int32_t bypass = 0; char destaddr[64],destaddr2[64]; struct iguana_info *coin = LP_coinfind(symbol);
destaddr[0] = destaddr2[0] = 0;
if ( coin != 0 && IAMLP != 0 && coin->inactive != 0 )
if ( coin != 0 && ((IAMLP != 0 && coin->inactive != 0) || coin->electrum != 0) )
bypass = 1;
if ( bypass != 0 )
val = satoshis;

Loading…
Cancel
Save