From df06e9c9796578f35e41404a44b8d7ec18943463 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 8 Apr 2017 11:48:47 +0300 Subject: [PATCH] Test --- basilisk/basilisk_DEX.c | 1 + basilisk/jumblr.c | 4 ++-- basilisk/smartaddress.c | 4 +--- basilisk/tradebots_liquidity.c | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/basilisk/basilisk_DEX.c b/basilisk/basilisk_DEX.c index d25e8d0ba..c430f292e 100755 --- a/basilisk/basilisk_DEX.c +++ b/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; diff --git a/basilisk/jumblr.c b/basilisk/jumblr.c index 07190826d..4624d147e 100755 --- a/basilisk/jumblr.c +++ b/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; diff --git a/basilisk/smartaddress.c b/basilisk/smartaddress.c index ff9707b0c..39fcab19a 100755 --- a/basilisk/smartaddress.c +++ b/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; inumsmartaddrs; 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]); diff --git a/basilisk/tradebots_liquidity.c b/basilisk/tradebots_liquidity.c index 024a554ff..76cda30bc 100755 --- a/basilisk/tradebots_liquidity.c +++ b/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);