From 0bf061757789ed86e2e77116bf66ffb4aab1616e Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 13 Apr 2018 19:55:31 +0300 Subject: [PATCH] Test --- src/komodo_bitcoind.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 9e7849a68..ef99aec75 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -739,9 +739,9 @@ void komodo_pindex_init(CBlockIndex *pindex,int32_t height) if ( komodo_blockload(block,pindex) == 0 ) { komodo_block2pubkey33(pindex->pubkey33,block); - //for (i=0; i<33; i++) - // fprintf(stderr,"%02x",pindex->pubkey33[i]); - //fprintf(stderr," set pubkey at height %d/%d\n",pindex->nHeight,height); + for (i=0; i<33; i++) + fprintf(stderr,"%02x",pindex->pubkey33[i]); + fprintf(stderr," set pubkey at height %d/%d\n",pindex->nHeight,height); //pindex->didinit = (KOMODO_LOADINGBLOCKS == 0); } // else fprintf(stderr,"error loading block at %d/%d",pindex->nHeight,height); } @@ -770,6 +770,11 @@ void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height) memset(pubkey33,0,33); if ( pindex != 0 ) { + if ( komodo_blockload(block,pindex) == 0 ) + { + komodo_block2pubkey33(pindex->pubkey33,block); + return; + } if ( pindex->didinit != 0 ) { memcpy(pubkey33,pindex->pubkey33,33);