Browse Source

Test

etomic
jl777 7 years ago
parent
commit
ba77e50b6a
  1. 2
      iguana/exchanges/LP_portfolio.c
  2. 1
      iguana/exchanges/LP_prices.c

2
iguana/exchanges/LP_portfolio.c

@ -49,7 +49,7 @@ uint64_t LP_balance(uint64_t *valuep,int32_t iambob,char *symbol,char *coinaddr)
for (i=0; i<n; i++)
{
item = jitem(array,i);
valuesum += j64bits(item,"value");
valuesum += j64bits(item,"value") + j64bits(item,"value2");
satoshisum += j64bits(item,"satoshis");
}
}

1
iguana/exchanges/LP_prices.c

@ -650,6 +650,7 @@ void LP_pricefeedupdate(bits256 pubkey,char *base,char *rel,double price)
if ( (pubp= LP_pubkeyadd(pubkey)) != 0 )
{
pubp->matrix[basepp->ind][relpp->ind] = price;
pubp->matrix[relpp->ind][basepp->ind] = 1. / price;
pubp->timestamp = (uint32_t)time(NULL);
} else printf("error creating pubkey entry\n");
} else printf("error finding %s/%s %.8f\n",base,rel,price);

Loading…
Cancel
Save