Browse Source

Test

etomic
jl777 7 years ago
parent
commit
de8c4145d8
  1. 2
      iguana/exchanges/LP_cache.c
  2. 5
      iguana/exchanges/LP_nativeDEX.c
  3. 2
      iguana/exchanges/LP_socket.c

2
iguana/exchanges/LP_cache.c

@ -93,7 +93,7 @@ void LP_SPV_store(struct iguana_info *coin,bits256 txid,int32_t height)
sprintf(fname,"%s/UNSPENTS/%s.SPV",GLOBAL_DBDIR,coin->symbol), OS_portable_path(fname);
if ( (fp= OS_appendfile(fname)) != 0 )
{
//char str[65]; printf("store %s %s.[%d]\n",coin->symbol,bits256_str(str,txid),tx->len);
char str[65]; printf("store %s %s.[%d]\n",coin->symbol,bits256_str(str,txid),tx->len);
fwrite(&tx->txid,1,sizeof(tx->txid),fp);
fwrite(&tx->len,1,sizeof(tx->len),fp);
fwrite(&tx->height,1,sizeof(tx->height),fp);

5
iguana/exchanges/LP_nativeDEX.c

@ -467,7 +467,7 @@ void utxosQ_loop(void *myipaddr)
void LP_coinsloop(void *_coins)
{
struct LP_address *ap=0; cJSON *retjson; struct LP_address_utxo *up,*tmp; struct iguana_info *coin,*ctmp; char str[65]; struct electrum_info *ep,*backupep=0; bits256 zero; int32_t oldht,j,nonz; char *coins = _coins;
struct LP_address *ap=0,*atmp; cJSON *retjson; struct LP_address_utxo *up,*tmp; struct iguana_info *coin,*ctmp; char str[65]; struct electrum_info *ep,*backupep=0; bits256 zero; int32_t oldht,j,nonz; char *coins = _coins;
if ( strcmp("BTC",coins) == 0 )
{
strcpy(LP_coinsloopBTC_stats.name,"BTC coin loop");
@ -515,7 +515,8 @@ void LP_coinsloop(void *_coins)
{
if ( (backupep= ep->prev) == 0 )
backupep = ep;
if ( (ap= LP_addressfind(coin,coin->smartaddr)) != 0 )
HASH_ITER(hh,coin->addresses,ap,atmp)
//if ( (ap= LP_addressfind(coin,coin->smartaddr)) != 0 )
{
DL_FOREACH_SAFE(ap->utxos,up,tmp)
{

2
iguana/exchanges/LP_socket.c

@ -416,7 +416,7 @@ cJSON *electrum_submit(char *symbol,struct electrum_info *ep,cJSON **retjsonp,ch
{
*retjsonp = 0;
sprintf(stratumreq,"{ \"jsonrpc\":\"2.0\", \"id\": %u, \"method\":\"%s\", \"params\": %s }\n",ep->stratumid,method,params);
//printf("%s %s",symbol,stratumreq);
printf("%s %s",symbol,stratumreq);
memset(ep->buf,0,ep->bufsize);
sitem = electrum_sitem(ep,stratumreq,timeout,retjsonp);
/*sitem = (struct stritem *)queueitem(stratumreq);

Loading…
Cancel
Save