Browse Source

Test

etomic
jl777 8 years ago
parent
commit
068533aa78
  1. 2
      iguana/exchanges/LP_commands.c
  2. 3
      iguana/exchanges/LP_transaction.c

2
iguana/exchanges/LP_commands.c

@ -162,6 +162,8 @@ forwardhex(pubkey,hex)\n\
LP_privkey_init(-1,ptr,privkey,pubkey,pubkey33); LP_privkey_init(-1,ptr,privkey,pubkey,pubkey33);
retjson = cJSON_CreateObject(); retjson = cJSON_CreateObject();
jaddstr(retjson,"result","success"); jaddstr(retjson,"result","success");
jaddstr(retjson,"coin",coin);
jaddnum(retjson,"timestamp",time(NULL));
jadd(retjson,"alice",LP_inventory(coin,0)); jadd(retjson,"alice",LP_inventory(coin,0));
jadd(retjson,"bob",LP_inventory(coin,1)); jadd(retjson,"bob",LP_inventory(coin,1));
return(jprint(retjson,1)); return(jprint(retjson,1));

3
iguana/exchanges/LP_transaction.c

@ -136,7 +136,8 @@ int32_t LP_vinscan(bits256 *spendtxidp,int32_t *spendvinip,char *symbol,bits256
{ {
if ( bits256_cmp(txid,jbits256(txobj,"txid")) != 0 ) if ( bits256_cmp(txid,jbits256(txobj,"txid")) != 0 )
{ {
printf("txid mismatch error\n"); char str[65]; printf("txid mismatch error %s vs %s\n",bits256_str(str,txid),jprint(txobj,0));
free_json(txobj);
return(-2); return(-2);
} }
vins = jarray(&numvins,txobj,"vin"); vins = jarray(&numvins,txobj,"vin");

Loading…
Cancel
Save