From a76d74fc648fe8b7ca5a6f5f52ad487d699be5b2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 2 Jul 2019 07:25:58 -1100 Subject: [PATCH] Revert rand skip --- src/komodo_nSPV.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/komodo_nSPV.h b/src/komodo_nSPV.h index 4b46c830a..7fed4b206 100644 --- a/src/komodo_nSPV.h +++ b/src/komodo_nSPV.h @@ -223,19 +223,25 @@ void komodo_nSPV(CNode *pto) if ( (pto->nServices & NODE_ADDRINDEX) != 0 && timestamp > pto->lastutxos + ASSETCHAINS_BLOCKTIME ) { // get utxo since lastheight - request.resize(1); - request[0] = NSPV_UTXOS; - NSPV_lastutxos = pto->lastutxos = timestamp; - pto->PushMessage("getnSPV",request); + if ( (rand() % 100) < 10 ) + { + request.resize(1); + request[0] = NSPV_UTXOS; + NSPV_lastutxos = pto->lastutxos = timestamp; + pto->PushMessage("getnSPV",request); + } } } if ( timestamp > NSPV_lastinfo + ASSETCHAINS_BLOCKTIME/2 && timestamp > pto->lastinfo + ASSETCHAINS_BLOCKTIME ) { - // query current height, blockhash, notarization info - request.resize(1); - request[0] = NSPV_INFO; - NSPV_lastinfo = pto->lastinfo = timestamp; - pto->PushMessage("getnSPV",request); + if ( (rand() % 100) < 10 ) + { + // query current height, blockhash, notarization info + request.resize(1); + request[0] = NSPV_INFO; + NSPV_lastinfo = pto->lastinfo = timestamp; + pto->PushMessage("getnSPV",request); + } } }