From cd042e5ead2f701a7fa042a2815e965d706e18e6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 9 May 2018 13:52:18 +0300 Subject: [PATCH] Default using SPV cache firsttime --- iguana/exchanges/LP_socket.c | 2 +- iguana/exchanges/LP_transaction.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index 8444a69cc..39b96b0d6 100644 --- a/iguana/exchanges/LP_socket.c +++ b/iguana/exchanges/LP_socket.c @@ -613,7 +613,7 @@ cJSON *electrum_address_listunspent(char *symbol,struct electrum_info *ep,cJSON if ( (ap= LP_address(coin,addr)) != 0 ) { if ( ap->unspenttime == 0 ) - usecache = 0; + usecache = 1; else if ( ap->unspentheight < height ) usecache = 0; else if ( G.LP_pendingswaps != 0 && time(NULL) > ap->unspenttime+13 ) diff --git a/iguana/exchanges/LP_transaction.c b/iguana/exchanges/LP_transaction.c index 5d6a9b40d..8c2f1006e 100644 --- a/iguana/exchanges/LP_transaction.c +++ b/iguana/exchanges/LP_transaction.c @@ -1035,6 +1035,8 @@ uint64_t _komodo_interestnew(uint64_t nValue,uint32_t nLockTime,uint32_t tiptime //printf("minutes.%d tiptime.%u locktime.%u\n",minutes,tiptime,nLockTime); if ( minutes > 365 * 24 * 60 ) minutes = 365 * 24 * 60; + if ( nLockTime > 1536000000 && minutes > 31*24*60 ) + minutes = 31 * 24 * 60; minutes -= 59; interest = ((nValue / 10512000) * minutes); }