From 2800b74418ee46ce1c163bb5cb167e3803536569 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 10 May 2018 10:27:28 +0300 Subject: [PATCH] Initial condition fix --- iguana/exchanges/LP_socket.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index 39b96b0d6..b8e74e84c 100644 --- a/iguana/exchanges/LP_socket.c +++ b/iguana/exchanges/LP_socket.c @@ -613,7 +613,11 @@ cJSON *electrum_address_listunspent(char *symbol,struct electrum_info *ep,cJSON if ( (ap= LP_address(coin,addr)) != 0 ) { if ( ap->unspenttime == 0 ) + { + ap->unspenttime = (uint32_t)time(NULL); + ap->unspentheight = height; usecache = 1; + } else if ( ap->unspentheight < height ) usecache = 0; else if ( G.LP_pendingswaps != 0 && time(NULL) > ap->unspenttime+13 )