From 9a3cf79c3760fb3ff8a70f7f29340bba520345ce Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 9 Jul 2019 02:00:15 -1100 Subject: [PATCH] Test --- src/komodo_nSPV.h | 1 + src/komodo_nSPV_fullnode.h | 16 +++++++++------- src/net.cpp | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/komodo_nSPV.h b/src/komodo_nSPV.h index d4a4fd90f..e0a003fcd 100644 --- a/src/komodo_nSPV.h +++ b/src/komodo_nSPV.h @@ -23,6 +23,7 @@ // CC signing // make sure to sanity check all vector lengths on receipt // make sure no files are updated (this is to allow nSPV=1 and later nSPV=0 without affecting database) +// bug: under load, fullnode was returning all 0 nServices #ifndef KOMODO_NSPV_H #define KOMODO_NSPV_H diff --git a/src/komodo_nSPV_fullnode.h b/src/komodo_nSPV_fullnode.h index 436095945..948846fe5 100644 --- a/src/komodo_nSPV_fullnode.h +++ b/src/komodo_nSPV_fullnode.h @@ -210,15 +210,17 @@ int32_t NSPV_sendrawtransaction(struct NSPV_broadcastresp *ptr,uint8_t *data,int { LOCK(cs_main); ptr->txid = tx.GetHash(); - fprintf(stderr,"addmempool transaction %s\n",ptr->txid.GetHex().c_str()); + fprintf(stderr,"try to addmempool transaction %s\n",ptr->txid.GetHex().c_str()); if ( myAddtomempool(tx) != 0 ) + { + int32_t i; + for (i=0; itxid.GetHex().c_str(),ptr->retcode); ptr->retcode = 1; - else ptr->retcode = 0; - int32_t i; - for (i=0; itxid.GetHex().c_str(),ptr->retcode); - RelayTransaction(tx); + RelayTransaction(tx); + } else ptr->retcode = -3; + } else ptr->retcode = -1; return(sizeof(*ptr)); } diff --git a/src/net.cpp b/src/net.cpp index 23d20e4c0..02cddd3e2 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1843,7 +1843,7 @@ bool StopNode() for (int i=0; ipost(); - if (fAddressesInitialized) + if (KOMODO_NSPV == 0 && fAddressesInitialized) { DumpAddresses(); fAddressesInitialized = false;