Browse Source

Test

etomic
jl777 7 years ago
parent
commit
92c1811060
  1. 4
      iguana/exchanges/LP_nativeDEX.c
  2. 7
      iguana/exchanges/LP_utxos.c

4
iguana/exchanges/LP_nativeDEX.c

@ -560,7 +560,6 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
printf("jeezy says we cant use the nullstring as passphrase and I agree\n");
exit(-1);
}
LP_sessionid = (uint32_t)time(NULL);
IAMLP = !amclient;
#ifndef __linux__
if ( IAMLP != 0 )
@ -608,7 +607,8 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
portable_mutex_init(&LP_psockmutex);
portable_mutex_init(&LP_coinmutex);
portable_mutex_init(&LP_pubkeymutex);
printf("getting myipaddr\n");
LP_sessionid = (uint32_t)time(NULL);
printf("getting myipaddr sessionid.%u\n",LP_sessionid);
if ( system("curl -s4 checkip.amazonaws.com > /tmp/myipaddr") == 0 )
{
if ( (myipaddr= OS_filestr(&filesize,"/tmp/myipaddr")) != 0 && myipaddr[0] != 0 )

7
iguana/exchanges/LP_utxos.c

@ -271,11 +271,7 @@ cJSON *LP_inventoryjson(cJSON *item,struct LP_utxoinfo *utxo)
jaddstr(item,"swap","in progress");
if ( utxo->T.spentflag != 0 )
jaddnum(item,"spent",utxo->T.spentflag);
if ( LP_ismine(utxo) > 0 )
{
jaddnum(item,"session",LP_sessionid);
//printf("sessionid.%u %s\n",LP_sessionid,jprint(item,0));
} else jaddnum(item,"session",utxo->T.sessionid);
jaddnum(item,"session",utxo->T.sessionid);
return(item);
}
@ -589,6 +585,7 @@ struct LP_utxoinfo *LP_utxoadd(int32_t iambob,int32_t mypubsock,char *symbol,bit
LP_utxosetkey(utxo->key2,txid2,vout2);
if ( LP_ismine(utxo) > 0 )
utxo->T.sessionid = LP_sessionid;
else utxo->T.sessionid = sessionid;
portable_mutex_lock(&LP_utxomutex);
HASH_ADD_KEYPTR(hh,LP_utxoinfos[iambob],utxo->key,sizeof(utxo->key),utxo);
if ( _LP_utxo2find(iambob,txid2,vout2) == 0 )

Loading…
Cancel
Save