Rely on cached KOMODO_LONGESTCHAIN in netinfo

This commit is contained in:
jl777
2018-04-25 15:17:07 +03:00
parent 6bb74a0256
commit daf214b1b6
3 changed files with 6 additions and 4 deletions

View File

@@ -123,7 +123,7 @@ UniValue getinfo(const UniValue& params, bool fHelp)
}
#endif
obj.push_back(Pair("blocks", (int)chainActive.Height()));
if ( (longestchain= komodo_longestchain()) != 0 && chainActive.Height() > longestchain )
if ( (longestchain= KOMODO_LONGESTCHAIN) != 0 && chainActive.Height() > longestchain )
longestchain = chainActive.Height();
//fprintf(stderr,"after longestchain\n");
obj.push_back(Pair("longestchain", longestchain));