diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index c2f7cf33a..1a2a0fdce 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -18,13 +18,13 @@ // marketmaker // // prune expired/spent deposits from instantdex.json +// CPU usage spike after 12 hours // verify claim works // big BTC swaps // https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki for signing BCH/BTG // // compress packets // cancel bid/ask -// portfolio: // portfolio to set prices from historical // portfolio value based on ask? // USD paxprice based USDvalue in portfolio diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index dd92ce018..9126d1dde 100644 --- a/iguana/exchanges/LP_socket.c +++ b/iguana/exchanges/LP_socket.c @@ -1016,6 +1016,19 @@ void LP_dedicatedloop(void *arg) len += n; if ( ep->buf[len - 1] == '\n' ) break; + memset(&fds,0,sizeof(fds)); + fds.fd = ep->sock; + fds.events = POLLIN; + if ( poll(&fds,1,1000) <= 0 ) + { + printf("no more electrum data after a second\n"); + break; + } + } + else + { + printf("no more electrum data when expected\n"); + break; } } if ( len > 0 )