Browse Source

Test

etomic
jl777 7 years ago
parent
commit
9f333982f4
  1. 2
      iguana/exchanges/LP_coins.c
  2. 15
      iguana/exchanges/LP_nativeDEX.c

2
iguana/exchanges/LP_coins.c

@ -447,8 +447,6 @@ struct iguana_info *LP_coincreate(cJSON *item)
}
if ( 0 && coin != 0 && coin->inactive != 0 )
printf("LPnode.%d %s inactive.%u %p vs %p\n",IAMLP,coin->symbol,coin->inactive,assetname,name);
if ( coin != 0 && LP_getheight(coin) <= 0 )
coin->inactive = (uint32_t)time(NULL);
return(0);
}

15
iguana/exchanges/LP_nativeDEX.c

@ -676,21 +676,28 @@ int32_t LP_mainloop_iter(void *ctx,char *myipaddr,struct LP_peerinfo *mypeer,int
void LP_initcoins(void *ctx,int32_t pubsock,cJSON *coins)
{
int32_t i,n; cJSON *item;
int32_t i,n; cJSON *item; char *symbol; struct iguana_info *coin;
for (i=0; i<sizeof(activecoins)/sizeof(*activecoins); i++)
{
printf("%s ",activecoins[i]);
LP_coinfind(activecoins[i]);
LP_priceinfoadd(activecoins[i]);
if ( (coin= LP_coinfind(activecoins[i])) != 0 && LP_getheight(coin) <= 0 )
coin->inactive = (uint32_t)time(NULL);
}
if ( (n= cJSON_GetArraySize(coins)) > 0 )
{
for (i=0; i<n; i++)
{
item = jitem(coins,i);
printf("%s ",jstr(item,"coin"));
LP_coincreate(item);
LP_priceinfoadd(jstr(item,"coin"));
if ( (symbol= jstr(item,"coin")) != 0 )
{
printf("%s ",jstr(item,"coin"));
LP_coincreate(item);
LP_priceinfoadd(jstr(item,"coin"));
if ( (coin= LP_coinfind(symbol)) != 0 && LP_getheight(coin) <= 0 )
coin->inactive = (uint32_t)time(NULL);
}
}
}
printf("privkey updates\n");

Loading…
Cancel
Save