Browse Source

Test

etomic
jl777 8 years ago
parent
commit
00666b9ec0
  1. 2
      iguana/exchanges/LP_include.h
  2. 5
      iguana/exchanges/LP_nativeDEX.c

2
iguana/exchanges/LP_include.h

@ -171,7 +171,7 @@ struct LP_utxoinfo
uint8_t key[sizeof(bits256) + sizeof(int32_t)];
uint8_t key2[sizeof(bits256) + sizeof(int32_t)];
int32_t vout,vout2,pair;
uint32_t lasttime,errors,swappending,published,spentflag;
uint32_t lasttime,errors,swappending,published,spentflag,lastspentcheck;
double profitmargin;
char ipaddr[64],coinaddr[64],spendscript[256],coin[16];
uint16_t port;

5
iguana/exchanges/LP_nativeDEX.c

@ -165,9 +165,10 @@ void LP_mainloop(struct LP_peerinfo *mypeer,uint16_t mypubport,int32_t pubsock,i
char str[65];
HASH_ITER(hh,LP_utxoinfos,utxo,utmp)
{
if ( utxo->spentflag == 0 )
now = (uint32_t)time(NULL);
if ( utxo->spentflag == 0 && now > utxo->lastspentcheck+60 )
{
printf("mainloop check spent\n");
utxo->lastspentcheck = now;
if ( LP_txvalue(utxo->coin,utxo->txid,utxo->vout) == 0 )
{
printf("txid.%s %s/v%d %.8f has been spent\n",utxo->coin,bits256_str(str,utxo->txid),utxo->vout,dstr(utxo->value));

Loading…
Cancel
Save