jl777 7 years ago
parent
commit
903a90af5e
  1. 2
      iguana/exchanges/LP_include.h
  2. 2
      iguana/exchanges/LP_nativeDEX.c
  3. 2
      iguana/exchanges/LP_prices.c

2
iguana/exchanges/LP_include.h

@ -182,7 +182,7 @@ struct iguana_info
portable_mutex_t txmutex,addrmutex; struct LP_transaction *transactions; struct LP_address *addresses;
uint64_t txfee;
int32_t longestchain,firstrefht,firstscanht,lastscanht,bussock,height; uint16_t busport;
uint32_t lastutxos,updaterate,counter,inactive,lastmempool,lastgetinfo,ratetime,heighttime,lastmonitor,unspenttime;
uint32_t lastutxos,updaterate,counter,inactive,lastmempool,lastgetinfo,ratetime,heighttime,lastmonitor,unspenttime,obooktime;
uint8_t pubtype,p2shtype,isPoS,wiftype,wiftaddr,taddr,noimportprivkey_flag;
char symbol[16],smartaddr[64],userpass[1024],serverport[128],lastunspent[64];
// portfolio

2
iguana/exchanges/LP_nativeDEX.c

@ -478,6 +478,8 @@ int32_t LP_mainloop_iter(void *ctx,char *myipaddr,struct LP_peerinfo *mypeer,int
continue;
if ( coin->electrum != 0 )
continue;
if ( coin->obooktime == 0 )
continue;
if ( time(NULL) > coin->lastgetinfo+LP_GETINFO_INCR )
{
if ( (height= LP_getheight(coin)) > coin->longestchain )

2
iguana/exchanges/LP_prices.c

@ -746,6 +746,8 @@ char *LP_orderbook(char *base,char *rel,int32_t duration)
baseid = basepp->ind;
relid = relpp->ind;
now = (uint32_t)time(NULL);
basecoin->obooktime = now;
relcoin->obooktime = now;
cachenumbids = numbids, cachenumasks = numasks;
//printf("start cache.(%d %d) numbids.%d numasks.%d\n",cachenumbids,cachenumasks,numbids,numasks);
numasks = LP_orderbook_utxoentries(now,1,base,rel,&asks,numasks,cachenumasks,duration);

Loading…
Cancel
Save