Browse Source

Test

etomic
jl777 8 years ago
parent
commit
ae2595361c
  1. 2
      basilisk/basilisk_DEX.c
  2. 2
      basilisk/tradebots_liquidity.c

2
basilisk/basilisk_DEX.c

@ -639,7 +639,7 @@ HASH_ARRAY_STRING(InstantDEX,request,hash,vals,hexstr)
{ {
uint8_t serialized[512]; char buf[512]; struct basilisk_request R; int32_t iambob,optionhours; cJSON *reqjson; uint32_t datalen=0,DEX_channel; struct iguana_info *bobcoin,*alicecoin; uint8_t serialized[512]; char buf[512]; struct basilisk_request R; int32_t iambob,optionhours; cJSON *reqjson; uint32_t datalen=0,DEX_channel; struct iguana_info *bobcoin,*alicecoin;
myinfo->DEXactive = (uint32_t)time(NULL) + 3*BASILISK_TIMEOUT + 60; myinfo->DEXactive = (uint32_t)time(NULL) + 3*BASILISK_TIMEOUT + 60;
jadd64bits(vals,"minamount",jdouble(vals,"minprice") * jdouble(vals,"amount") * SATOSHIDEN); jadd64bits(vals,"minamount",jdouble(vals,"minprice") * jdouble(vals,"amount") * SATOSHIDEN * SATOSHIDEN);
if ( jobj(vals,"srchash") == 0 ) if ( jobj(vals,"srchash") == 0 )
jaddbits256(vals,"srchash",myinfo->myaddr.persistent); jaddbits256(vals,"srchash",myinfo->myaddr.persistent);
if ( jobj(vals,"desthash") == 0 ) if ( jobj(vals,"desthash") == 0 )

2
basilisk/tradebots_liquidity.c

@ -932,6 +932,8 @@ void _default_liquidity_command(struct supernet_info *myinfo,char *base,bits256
li.ask = jdouble(vals,"ask"); li.ask = jdouble(vals,"ask");
if ( (li.minvol= jdouble(vals,"minvol")) <= 0. ) if ( (li.minvol= jdouble(vals,"minvol")) <= 0. )
li.minvol = (strcmp("BTC",base) == 0) ? 0.0001 : 0.001; li.minvol = (strcmp("BTC",base) == 0) ? 0.0001 : 0.001;
if ( strcmp(li.base,"KMD") == 0 && strcmp(li.rel,"BTC") == 0 && li.minvol > 100. )
li.minvol = 100.;
if ( (li.maxvol= jdouble(vals,"maxvol")) < li.minvol ) if ( (li.maxvol= jdouble(vals,"maxvol")) < li.minvol )
li.maxvol = li.minvol; li.maxvol = li.minvol;
if ( (li.totalvol= jdouble(vals,"total")) < li.maxvol ) if ( (li.totalvol= jdouble(vals,"total")) < li.maxvol )

Loading…
Cancel
Save