From d4cc6fc35a24da804cdb37b60ae0b1d98c564f92 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 27 Mar 2018 19:29:30 +0300 Subject: [PATCH] Test --- src/komodo_bitcoind.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index e23119eaa..8a3577941 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -637,16 +637,14 @@ int32_t komodo_block2height(CBlock *block) } //komodo_init(height); } - if ( height > 0 && height2 >= 0 ) + if ( height != height2 ) { static uint32_t match,mismatch; - if ( height != height2 || ((match+mismatch) % 10) == 9 ) - { - mismatch++, fprintf(stderr,"block2height height.%d vs height2.%d, match.%d mismatch.%d\n",height,height2,match,mismatch); + fprintf(stderr,"block2height height.%d vs height2.%d, match.%d mismatch.%d\n",height,height2,match,mismatch); + mismatch++; + if ( height2 >= 0 ) height = height2; - } - else match++; - } + } else match++; return(height); }