diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp index d2798f10c..a7a4bf051 100644 --- a/src/rpcnet.cpp +++ b/src/rpcnet.cpp @@ -165,6 +165,7 @@ UniValue getpeerinfo(const UniValue& params, bool fHelp) return ret; } +int32_t KOMODO_LONGESTCHAIN; int32_t komodo_longestchain() { int32_t ht,n=0,num=0,maxheight=0,height = 0; @@ -191,8 +192,12 @@ int32_t komodo_longestchain() height = ht; } if ( num > (n >> 1) ) + { + KOMODO_LONGESTCHAIN = height; return(height); - else return(0); + } + KOMODO_LONGESTCHAIN = 0; + return(0); } UniValue addnode(const UniValue& params, bool fHelp)