Browse Source

Test

etomic
jl777 8 years ago
parent
commit
323f473806
  1. 1
      iguana/exchanges/LP_commands.c
  2. 2
      iguana/exchanges/LP_nativeDEX.c

1
iguana/exchanges/LP_commands.c

@ -39,6 +39,7 @@ void LP_command(struct LP_peerinfo *mypeer,int32_t pubsock,cJSON *argjson,uint8_
{ {
char *method,*base,*rel,*retstr,*pairstr; cJSON *retjson; double price; bits256 srchash,desthash,pubkey,privkey,txid,desttxid; struct LP_utxoinfo *utxo; uint32_t timestamp,quotetime; int32_t destvout,DEXselector = 0; uint64_t txfee,satoshis,desttxfee,destsatoshis,value; struct basilisk_request R; char *method,*base,*rel,*retstr,*pairstr; cJSON *retjson; double price; bits256 srchash,desthash,pubkey,privkey,txid,desttxid; struct LP_utxoinfo *utxo; uint32_t timestamp,quotetime; int32_t destvout,DEXselector = 0; uint64_t txfee,satoshis,desttxfee,destsatoshis,value; struct basilisk_request R;
printf("LP_command.(%s)\n",jprint(argjson,0)); printf("LP_command.(%s)\n",jprint(argjson,0));
//LP_command.({"txid":"f5d5e2eb4ef85c78f95076d0d2d99af9e1b85968e57b3c7bdb282bd005f7c341","vout":1,"rel":"BTC","method":"price"})
if ( (method= jstr(argjson,"method")) != 0 ) if ( (method= jstr(argjson,"method")) != 0 )
{ {
txid = jbits256(argjson,"txid"); txid = jbits256(argjson,"txid");

2
iguana/exchanges/LP_nativeDEX.c

@ -766,7 +766,7 @@ void LP_mainloop(struct LP_peerinfo *mypeer,uint16_t mypubport,int32_t pubsock,i
reqjson = cJSON_CreateObject(); reqjson = cJSON_CreateObject();
jaddbits256(reqjson,"txid",jbits256(item,"txid")); jaddbits256(reqjson,"txid",jbits256(item,"txid"));
jaddnum(reqjson,"vout",jint(item,"vout")); jaddnum(reqjson,"vout",jint(item,"vout"));
jaddstr(reqjson,"base",jstr(item,"base")); jaddstr(reqjson,"base",jstr(item,"coin"));
jaddstr(reqjson,"rel","BTC"); jaddstr(reqjson,"rel","BTC");
jaddstr(reqjson,"method","price"); jaddstr(reqjson,"method","price");
//5.9.253.196:7779 [{"ipaddr":"5.9.253.196","port":7779,"profit":0.01064000,"coin":"KMD","address":"RFQn4gNG555woQWQV1wPseR47spCduiJP5","script":"76a914434009423522682bd7cc1b18a614c3096d19683188ac","txid":"f5d5e2eb4ef85c78f95076d0d2d99af9e1b85968e57b3c7bdb282bd005f7c341","vout":1,"value":100,"deposit":"07902a65d11f0f577a0346432bcd2b6b53de5554c314209d1964693962524d69","dvout":1,"dvalue":120}] //5.9.253.196:7779 [{"ipaddr":"5.9.253.196","port":7779,"profit":0.01064000,"coin":"KMD","address":"RFQn4gNG555woQWQV1wPseR47spCduiJP5","script":"76a914434009423522682bd7cc1b18a614c3096d19683188ac","txid":"f5d5e2eb4ef85c78f95076d0d2d99af9e1b85968e57b3c7bdb282bd005f7c341","vout":1,"value":100,"deposit":"07902a65d11f0f577a0346432bcd2b6b53de5554c314209d1964693962524d69","dvout":1,"dvalue":120}]

Loading…
Cancel
Save