jl777 8 years ago
parent
commit
2f3122a8a6
  1. 2
      basilisk/basilisk_tradebot.c
  2. 4
      iguana/iguana_unspents.c
  3. 1
      iguana/tests/LPinit
  4. 2
      iguana/tests/decoderawtransaction

2
basilisk/basilisk_tradebot.c

@ -192,6 +192,8 @@ double basilisk_request_listprocess(struct supernet_info *myinfo,struct basilisk
{
if ( (aveprice= instantdex_avehbla(myinfo,retvals,list[0].src,list[0].dest,1.3 * dstr(list[0].srcamount))) == 0. || refprice > aveprice )
aveprice = refprice;
if ( fabs(aveprice) < SMALLVAL )
return(0);
destamount = (1.0 - profitmargin) * aveprice * list[0].srcamount;
if ( (retstr= InstantDEX_available(myinfo,iguana_coinfind(list[0].dest),0,0,list[0].dest)) != 0 )
{

4
iguana/iguana_unspents.c

@ -835,8 +835,8 @@ int32_t iguana_RTunspent_check(struct supernet_info *myinfo,struct iguana_info *
{
bits256 txid; int32_t vout,spentheight;
memset(&txid,0,sizeof(txid));
//if ( coin->FULLNODE == 0 && coin->VALIDATENODE == 0 )
// return(0);
if ( coin->FULLNODE == 0 && coin->VALIDATENODE == 0 )
return(0);
if ( iguana_RTunspentind2txid(myinfo,coin,&spentheight,&txid,&vout,outpt) == 0 )
{
//char str[65]; printf("verify %s/v%d is not already used\n",bits256_str(str,txid),vout);

1
iguana/tests/LPinit

@ -0,0 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"tradebot\",\"method\":\"liquidity\",\"targetcoin\",\"BTCD\",\"vals\":{\"profit\":0.005}}"

2
iguana/tests/decoderawtransaction

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"SYS\",\"method\":\"decoderawtransaction\",\"params\":[\"0100000002006a9affa9b868cd4da9598f9a311bc8315dd0beafcdc4066f7eb4a55d19fae80100000000ffffffff00bcb83647bdcf661a4e71e96ee0ee84f77f09e278120a9479e19c709238963d0000000000ffffffff0210270000000000001976a914df3f034f9805301d881b0d8c24a106f8d4c7fc8c88acdc840100000000001976a9142f4c0f91fc06ac228c120aee41741d0d3909683288ac00000000\", 1]}"
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"SYS\",\"method\":\"decoderawtransaction\",\"params\":[\"010000000100bcb83647bdcf661a4e71e96ee0ee84f77f09e278120a9479e19c709238963d0000000000ffffffff0210270000000000001976a914df3f034f9805301d881b0d8c24a106f8d4c7fc8c88ac9e370100000000001976a9142f4c0f91fc06ac228c120aee41741d0d3909683288ac00000000\", 1]}"

Loading…
Cancel
Save