Browse Source

Test

etomic
jl777 8 years ago
parent
commit
95e7db506e
  1. 4
      basilisk/basilisk.c
  2. 6
      basilisk/smartaddress.c

4
basilisk/basilisk.c

@ -1205,7 +1205,9 @@ HASH_ARRAY_STRING(basilisk,value,hash,vals,hexstr)
{
if ( (value= SATOSHIDEN*jdouble(txoutjson,"value")) == 0 )
value = SATOSHIDEN*jdouble(txoutjson,"amount");
if ( (coinaddr= jstr(txoutjson,"address")) != 0 && value != 0 )
if ( (coinaddr= jstr(txoutjson,"address")) == 0 && (addrs= jarray(&n,txoutjson,"addresses")) != 0 && n > 0 )
coinaddr = jstri(addrs,0);
if ( coinaddr != 0 && value != 0 )
{
retjson = cJSON_CreateObject();
jaddstr(retjson,"result","success");

6
basilisk/smartaddress.c

@ -471,7 +471,7 @@ void smartaddress_jumblr(struct supernet_info *myinfo,char *symbol,char *coinadd
{
if ( strcmp(coinaddr,basecoin->DEXinfo.jumblraddr) == 0 )
smartaddress_dex(myinfo,2,basecoin,coinaddr,basecoin->DEXinfo.jumblravail,relcoin,maxbid,minask,extraobj,credits);
else printf("smartaddress_jumblr: mismatch jumblr address (%s) vs (%s)\n",coinaddr,basecoin->DEXinfo.jumblraddr);
else printf("smartaddress_jumblr.%s: mismatch jumblr address (%s) vs (%s)\n",symbol,coinaddr,basecoin->DEXinfo.jumblraddr);
}
}
@ -540,11 +540,13 @@ void smartaddress_update(struct supernet_info *myinfo,int32_t selector)
for (j=0; j<m; j++)
{
coinitem = jitem(array,j);
symbol = jstr(coinitem,"coin");
if ( (symbol= jstr(coinitem,"coin")) == 0 )
continue;
if ( iter == 0 )
smartaddress_coinupdate(myinfo,symbol,kmdcoin->DEXinfo.btcprice,kmdcoin->DEXinfo.avail,kmdcoin->DEXinfo.USD_average);
else
{
printf("Action.(%s)\n",jprint(coinitem,0));
address = jstr(coinitem,"address");
maxbid = jdouble(coinitem,"maxbid");
minask = jdouble(coinitem,"minask");

Loading…
Cancel
Save