Browse Source

Merge pull request #834 from jl777/jl777

Revert portfolio caching
pass-iguana-arg
jl777 7 years ago
committed by GitHub
parent
commit
d7c18acab0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      iguana/exchanges/LP_nativeDEX.c
  2. 6
      iguana/exchanges/LP_portfolio.c

2
iguana/exchanges/LP_nativeDEX.c

@ -570,8 +570,6 @@ void LP_coinsloop(void *_coins)
memset(&zero,0,sizeof(zero)); memset(&zero,0,sizeof(zero));
if ( coin->inactive != 0 ) if ( coin->inactive != 0 )
continue; continue;
coin->balanceA = LP_balance(&coin->valuesumA,0,coin->symbol,coin->smartaddr);
coin->balanceB = LP_balance(&coin->valuesumB,1,coin->symbol,coin->smartaddr);
if ( coin->did_addrutxo_reset == 0 ) if ( coin->did_addrutxo_reset == 0 )
{ {
int32_t num; int32_t num;

6
iguana/exchanges/LP_portfolio.c

@ -143,14 +143,14 @@ char *LP_portfolio()
{ {
HASH_ITER(hh,LP_coins,coin,tmp) HASH_ITER(hh,LP_coins,coin,tmp)
{ {
if ( coin->inactive != 0 || coin->balanceA == 0 || coin->balanceB == 0 )//|| (coin->electrum != 0 && coin->obooktime == 0) ) if ( coin->inactive != 0 )//|| (coin->electrum != 0 && coin->obooktime == 0) )
continue; continue;
if ( iter == 0 ) if ( iter == 0 )
{ {
//printf("from portfolio\n"); //printf("from portfolio\n");
//LP_privkey_init(-1,coin,G.LP_privkey,G.LP_mypub25519); //LP_privkey_init(-1,coin,G.LP_privkey,G.LP_mypub25519);
//coin->balanceA = LP_balance(&coin->valuesumA,0,coin->symbol,coin->smartaddr); coin->balanceA = LP_balance(&coin->valuesumA,0,coin->symbol,coin->smartaddr);
//coin->balanceB = LP_balance(&coin->valuesumB,1,coin->symbol,coin->smartaddr); coin->balanceB = LP_balance(&coin->valuesumB,1,coin->symbol,coin->smartaddr);
if ( strcmp(coin->symbol,"KMD") != 0 ) if ( strcmp(coin->symbol,"KMD") != 0 )
coin->price_kmd = LP_price(coin->symbol,"KMD"); coin->price_kmd = LP_price(coin->symbol,"KMD");
else coin->price_kmd = 1.; else coin->price_kmd = 1.;

Loading…
Cancel
Save