From f7dc8fe3e7b27ed8606ea19a6439dfbc0b373318 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 11 Nov 2018 05:15:27 -1100 Subject: [PATCH] Skip longest chain call, since it is in connect tip --- src/komodo_gateway.h | 2 +- src/rpcblockchain.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 400ded593..96d4ea121 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -1382,7 +1382,7 @@ void komodo_passport_iteration() { if ( ASSETCHAINS_SYMBOL[0] == 0 ) komodo_interestsum(); - komodo_longestchain(); + //komodo_longestchain(); lastinterest = komodo_chainactive_timestamp(); } refsp = komodo_stateptr(symbol,dest); diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index 868431f6f..91cd82303 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -33,6 +33,7 @@ extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& void ScriptPubKeyToJSON(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex); int32_t komodo_longestchain(); int32_t komodo_dpowconfs(int32_t height,int32_t numconfs); +extern int32_t KOMODO_LONGESTCHAIN; double GetDifficultyINTERNAL(const CBlockIndex* blockindex, bool networkDifficulty) { @@ -1327,7 +1328,7 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp) if ( ASSETCHAINS_SYMBOL[0] == 0 ) { progress = Checkpoints::GuessVerificationProgress(Params().Checkpoints(), chainActive.LastTip()); } else { - int32_t longestchain = komodo_longestchain(); + int32_t longestchain = KOMODO_LONGESTCHAIN;//komodo_longestchain(); progress = (longestchain > 0 ) ? (double) chainActive.Height() / longestchain : 1.0; } UniValue obj(UniValue::VOBJ);