From a19b28ce5e132fb66315cdb446390e20efcac38d Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 19 Nov 2016 17:10:01 -0300 Subject: [PATCH] test --- src/komodo_notary.h | 2 +- src/rpcmisc.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/komodo_notary.h b/src/komodo_notary.h index 61c9473fa..5cea65f95 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -108,7 +108,7 @@ void komodo_notarysinit(int32_t origheight,uint8_t pubkeys[64][33],int32_t num) memcpy(kp->pubkey,pubkeys[k],33); kp->notaryid = k; HASH_ADD_KEYPTR(hh,N.Notaries,kp->pubkey,33,kp); - if ( height > 0 ) + if ( height > 10000 ) { for (i=0; i<33; i++) printf("%02x",pubkeys[k][i]); diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp index 7f289723a..e6bf47e4f 100644 --- a/src/rpcmisc.cpp +++ b/src/rpcmisc.cpp @@ -46,7 +46,7 @@ int32_t komodo_notarized_height(uint256 *hashp,uint256 *txidp); Value getinfo(const Array& params, bool fHelp) { uint256 notarized_hash,notarized_desttxid; - int32_t notarized_height; + int32_t notarized_height,longestchain; if (fHelp || params.size() != 0) throw runtime_error( "getinfo\n" @@ -99,7 +99,9 @@ Value getinfo(const Array& params, bool fHelp) } #endif obj.push_back(Pair("blocks", (int)chainActive.Height())); - obj.push_back(Pair("longestchain", komodo_longestchain())); + if ( (longestchain= komodo_longestchain()) != 0 && chainActive.Height() > longestchain ) + longestchain = chainActive.Height(); + obj.push_back(Pair("longestchain", longestchain)); obj.push_back(Pair("timeoffset", GetTimeOffset())); if ( chainActive.Tip() != 0 ) obj.push_back(Pair("tiptime", (int)chainActive.Tip()->nTime));