From f785b4d7a5bd72b04427ef4022d59f04182cffb5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 13 Apr 2018 15:35:55 +0300 Subject: [PATCH] Test --- src/komodo_bitcoind.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 47a26473a..ba6c2e19b 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -727,7 +727,7 @@ void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height) CBlock block; int32_t num,i; uint8_t pubkeys[64][33]; //komodo_init(height); memset(pubkey33,0,33); - if ( pindex != 0 ) + if ( pindex != 0 && pindex->nHeight == height ) { if ( pindex->pubkey33[0] == 2 || pindex->pubkey33[0] == 3 ) { @@ -758,7 +758,7 @@ void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height) else { // height -> pubkey33 - fprintf(stderr,"extending chaintip komodo_index2pubkey33 height.%d need to get pubkey33\n",height); + fprintf(stderr,"extending chaintip komodo_index2pubkey33 height.%d pindex.%d need to get pubkey33\n",height,pindex!=0?pindex->nHeight:-1); } }