From a283a80dc118076c0e25f30c64df2a0ca1b404d4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 4 Jul 2019 02:51:36 -1100 Subject: [PATCH] Speed up listunspent --- src/komodo_nSPV.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_nSPV.h b/src/komodo_nSPV.h index eba075623..c14de849b 100644 --- a/src/komodo_nSPV.h +++ b/src/komodo_nSPV.h @@ -601,7 +601,7 @@ void komodo_nSPVreq(CNode *pfrom,std::vector request) // received a req if ( request[0] == NSPV_INFO ) // info { //fprintf(stderr,"check info %u vs %u, ind.%d\n",timestamp,pfrom->prevtimes[ind],ind); - if ( timestamp > pfrom->prevtimes[ind] + ASSETCHAINS_BLOCKTIME/2 ) + if ( timestamp > pfrom->prevtimes[ind] ) { struct NSPV_inforesp I; memset(&I,0,sizeof(I)); @@ -1150,7 +1150,7 @@ void komodo_nSPV(CNode *pto) // polling loop from SendMessages } } }*/ - if ( timestamp > NSPV_lastinfo + ASSETCHAINS_BLOCKTIME/2 && timestamp > pto->prevtimes[NSPV_INFO>>1] + ASSETCHAINS_BLOCKTIME/2 ) + if ( timestamp > NSPV_lastinfo + ASSETCHAINS_BLOCKTIME/2 && timestamp > pto->prevtimes[NSPV_INFO>>1] + 2*ASSETCHAINS_BLOCKTIME/3 ) { if ( (rand() % 100) < 10 ) // randomize which peer to query {