Browse Source

Test

etomic
jl777 8 years ago
parent
commit
df06e9c979
  1. 1
      basilisk/basilisk_DEX.c
  2. 4
      basilisk/jumblr.c
  3. 4
      basilisk/smartaddress.c
  4. 4
      basilisk/tradebots_liquidity.c

1
basilisk/basilisk_DEX.c

@ -479,6 +479,7 @@ char *basilisk_respond_accept(struct supernet_info *myinfo,bits256 privkey,uint3
retstr = clonestr("{\"error\":\"couldnt find to requestid to choose\"}");
return(retstr);
}
cJSON *basilisk_unspents(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr)
{
cJSON *unspents=0,*array=0; char *retstr;

4
basilisk/jumblr.c

@ -215,7 +215,7 @@ int64_t jumblr_balance(struct supernet_info *myinfo,struct iguana_info *coin,cha
}
else if ( (retstr= dex_getbalance(myinfo,coin,0,0,coin->symbol,addr)) != 0 )
{
printf("DEX retstr.(%s)\n",retstr);
//printf("DEX retstr.(%s)\n",retstr);
if ( (retjson= cJSON_Parse(retstr)) != 0 )
{
balance = jdouble(retjson,"balance") * SATOSHIDEN;
@ -714,7 +714,7 @@ void jumblr_CMCname(char *CMCname,char *symbol)
void jumblr_DEXcheck(struct supernet_info *myinfo,struct iguana_info *coin)
{
double vol,avail; struct iguana_info *kmdcoin,*coinbtc = 0;
if ( myinfo->IAMNOTARY != 0 )
if ( myinfo->IAMNOTARY != 0 || myinfo->IAMLP != 0 )
return;
if ( (kmdcoin= iguana_coinfind("KMD")) == 0 || (coinbtc= iguana_coinfind("BTC")) == 0 )
return;

4
basilisk/smartaddress.c

@ -17,8 +17,7 @@
int32_t smartaddress_add(struct supernet_info *myinfo,bits256 privkey,char *BTCaddr,char *KMDaddr)
{
struct smartaddress *ap;
int32_t i;
char coinaddr[64]; uint8_t addrtype,rmd160[20]; struct smartaddress *ap; int32_t i;
if ( myinfo->numsmartaddrs < sizeof(myinfo->smartaddrs)/sizeof(*myinfo->smartaddrs) )
{
for (i=0; i<myinfo->numsmartaddrs; i++)
@ -29,7 +28,6 @@ int32_t smartaddress_add(struct supernet_info *myinfo,bits256 privkey,char *BTCa
bitcoin_pubkey33(myinfo->ctx,ap->pubkey33,privkey);
calc_rmd160_sha256(ap->rmd160,ap->pubkey33,33);
ap->pubkey = curve25519(privkey,curve25519_basepoint9());
char coinaddr[64]; uint8_t addrtype,rmd160[20];
bitcoin_address(coinaddr,0,ap->pubkey33,33);
for (i=0; i<20; i++)
printf("%02x",ap->rmd160[i]);

4
basilisk/tradebots_liquidity.c

@ -984,7 +984,7 @@ void _default_liquidity_command(struct supernet_info *myinfo,char *base,bits256
} else tradebot_monitor(myinfo,0,0,0,li.exchange,li.base,li.rel,0.);
}
myinfo->linfos[i] = li;
printf("Set linfo[%d] %s (%s/%s) profitmargin %.6f bid %.8f ask %.8f minvol %.6f maxvol %.6f ref %.8f <- (%s)\n",i,li.exchange,li.base,li.rel,li.profit,li.bid,li.ask,li.minvol,li.maxvol,li.refprice,jprint(vals,0));
//printf("Set linfo[%d] %s (%s/%s) profitmargin %.6f bid %.8f ask %.8f minvol %.6f maxvol %.6f ref %.8f <- (%s)\n",i,li.exchange,li.base,li.rel,li.profit,li.bid,li.ask,li.minvol,li.maxvol,li.refprice,jprint(vals,0));
return;
}
}
@ -1150,7 +1150,7 @@ void tradebot_swap_balancingtrade(struct supernet_info *myinfo,struct basilisk_s
else if ( swap->DEXselector == 2 )
kmdcoin->DEXinfo.KMDpending -= swap->I.req.srcamount;
}
printf(">>>>>>>>>>>>>>>>>> balancing trade\n");
printf(">>>>>>>>>>>>>>>>>> balancing trade done by marketmaker\n");
return;
if ( swap->balancingtrade == 0 )
_default_swap_balancingtrade(myinfo,swap,iambob);

Loading…
Cancel
Save