Skip longest chain call, since it is in connect tip

This commit is contained in:
jl777
2018-11-11 05:15:27 -11:00
parent 58b0fc23ac
commit f7dc8fe3e7
2 changed files with 3 additions and 2 deletions

View File

@@ -1382,7 +1382,7 @@ void komodo_passport_iteration()
{ {
if ( ASSETCHAINS_SYMBOL[0] == 0 ) if ( ASSETCHAINS_SYMBOL[0] == 0 )
komodo_interestsum(); komodo_interestsum();
komodo_longestchain(); //komodo_longestchain();
lastinterest = komodo_chainactive_timestamp(); lastinterest = komodo_chainactive_timestamp();
} }
refsp = komodo_stateptr(symbol,dest); refsp = komodo_stateptr(symbol,dest);

View File

@@ -33,6 +33,7 @@ extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue&
void ScriptPubKeyToJSON(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex); void ScriptPubKeyToJSON(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex);
int32_t komodo_longestchain(); int32_t komodo_longestchain();
int32_t komodo_dpowconfs(int32_t height,int32_t numconfs); int32_t komodo_dpowconfs(int32_t height,int32_t numconfs);
extern int32_t KOMODO_LONGESTCHAIN;
double GetDifficultyINTERNAL(const CBlockIndex* blockindex, bool networkDifficulty) double GetDifficultyINTERNAL(const CBlockIndex* blockindex, bool networkDifficulty)
{ {
@@ -1327,7 +1328,7 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp)
if ( ASSETCHAINS_SYMBOL[0] == 0 ) { if ( ASSETCHAINS_SYMBOL[0] == 0 ) {
progress = Checkpoints::GuessVerificationProgress(Params().Checkpoints(), chainActive.LastTip()); progress = Checkpoints::GuessVerificationProgress(Params().Checkpoints(), chainActive.LastTip());
} else { } else {
int32_t longestchain = komodo_longestchain(); int32_t longestchain = KOMODO_LONGESTCHAIN;//komodo_longestchain();
progress = (longestchain > 0 ) ? (double) chainActive.Height() / longestchain : 1.0; progress = (longestchain > 0 ) ? (double) chainActive.Height() / longestchain : 1.0;
} }
UniValue obj(UniValue::VOBJ); UniValue obj(UniValue::VOBJ);