Browse Source

Test

etomic
jl777 8 years ago
parent
commit
3283316569
  1. 2
      basilisk/basilisk_MSG.c
  2. 5
      basilisk/jumblr.c

2
basilisk/basilisk_MSG.c

@ -479,7 +479,7 @@ int32_t basilisk_process_retarray(struct supernet_info *myinfo,void *ptr,int32_t
item = jitem(retarray,i); item = jitem(retarray,i);
if ( jobj(item,"error") != 0 ) if ( jobj(item,"error") != 0 )
continue; continue;
printf("(%s).%d ",jprint(item,0),i); //printf("(%s).%d ",jprint(item,0),i);
if ( (datalen= basilisk_message_returned(key,data,maxlen,item)) > 0 ) if ( (datalen= basilisk_message_returned(key,data,maxlen,item)) > 0 )
{ {
duration = juint(item,"duration"); duration = juint(item,"duration");

5
basilisk/jumblr.c

@ -383,6 +383,7 @@ void jumblr_DEXcheck(struct supernet_info *myinfo,struct iguana_info *coinkmd,ch
printf("BTC deposits %.8f, min %.8f\n",btcavail,minbtc); printf("BTC deposits %.8f, min %.8f\n",btcavail,minbtc);
vals = cJSON_CreateObject(); vals = cJSON_CreateObject();
jaddstr(vals,"source","BTC"); jaddstr(vals,"source","BTC");
jaddbits256(vals,"srchash",curve25519(privkey,curve25519_basepoint9()));
jaddstr(vals,"dest","KMD"); jaddstr(vals,"dest","KMD");
jaddnum(vals,"amount",btcavail*.3); jaddnum(vals,"amount",btcavail*.3);
jaddnum(vals,"minprice",kmdprice*.95); jaddnum(vals,"minprice",kmdprice*.95);
@ -494,6 +495,7 @@ STRING_ARG(jumblr,setpassphrase,passphrase)
retjson = cJSON_CreateObject(); retjson = cJSON_CreateObject();
jaddstr(retjson,"result","success"); jaddstr(retjson,"result","success");
privkey = jumblr_privkey(myinfo,BTCaddr,KMDaddr,JUMBLR_DEPOSITPREFIX); privkey = jumblr_privkey(myinfo,BTCaddr,KMDaddr,JUMBLR_DEPOSITPREFIX);
myinfo->jumblr_depositkey = curve25519(privkey,curve25519_basepoint9());
bitcoin_priv2wif(wifstr,privkey,coin->chain->wiftype); bitcoin_priv2wif(wifstr,privkey,coin->chain->wiftype);
if ( coin->FULLNODE < 0 ) if ( coin->FULLNODE < 0 )
jumblr_importprivkey(myinfo,coin,wifstr); jumblr_importprivkey(myinfo,coin,wifstr);
@ -506,7 +508,8 @@ STRING_ARG(jumblr,setpassphrase,passphrase)
jumblr_importprivkey(myinfo,coinbtc,wifstr); jumblr_importprivkey(myinfo,coinbtc,wifstr);
jaddnum(retjson,"BTCdeposits",dstr(jumblr_balance(myinfo,coinbtc,BTCaddr))); jaddnum(retjson,"BTCdeposits",dstr(jumblr_balance(myinfo,coinbtc,BTCaddr)));
} }
jumblr_privkey(myinfo,BTCaddr,KMDaddr,""); privkey = jumblr_privkey(myinfo,BTCaddr,KMDaddr,"");
myinfo->jumblr_pubkey = curve25519(privkey,curve25519_basepoint9());
jaddstr(retjson,"KMDjumblr",KMDaddr); jaddstr(retjson,"KMDjumblr",KMDaddr);
jaddstr(retjson,"BTCjumblr",BTCaddr); jaddstr(retjson,"BTCjumblr",BTCaddr);
if ( coinbtc != 0 ) if ( coinbtc != 0 )

Loading…
Cancel
Save