From caf6b6b54ac2fd8b121592fe5ac159ed0d696682 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 15 Apr 2018 20:30:30 +0300 Subject: [PATCH] KOMODO_LONGESTCHAIN = height; --- src/rpcnet.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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)