From 004ee06505598a452d5ac21d3803997cec06b4ae Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 18 Mar 2018 15:25:00 +0200 Subject: [PATCH] Max height --- iguana/iguana_notary.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index d4ea4a55f..5f0197e0b 100755 --- a/iguana/iguana_notary.c +++ b/iguana/iguana_notary.c @@ -577,13 +577,20 @@ void iguana_notarystats(int32_t totals[64],int32_t dispflag) STRING_AND_TWOINTS(dpow,notarizations,symbol,height,numblocks) { - int32_t i,j,ht,notht,masksums[64]; uint64_t signedmask; cJSON *retjson,*blockjson,*item,*array; bits256 blockhash; + int32_t i,j,ht,maxheight,notht,masksums[64]; uint64_t signedmask; cJSON *retjson,*blockjson,*item,*array; bits256 blockhash; + if ( (retjson= dpow_getinfo(myinfo,coin)) != 0 ) + { + maxheight = jint(retjson,"blocks"); + free_json(retjson); + } else maxheight = (1 << 30); memset(masksums,0,sizeof(masksums)); if ( (coin= iguana_coinfind(symbol)) != 0 ) { for (i=0; i maxheight ) + break; blockhash = dpow_getblockhash(myinfo,coin,ht); if ( (blockjson= dpow_getblock(myinfo,coin,blockhash)) != 0 ) {