From 0fba8caa9d80be367c6bf038038c4659e4bb0956 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 13 Apr 2018 20:13:38 +0300 Subject: [PATCH] Test --- src/komodo_bitcoind.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index e19a1126c..3dd01b2a9 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -770,11 +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 ) + if ( komodo_blockload(block,pindex) == 0 ) { komodo_block2pubkey33(pindex->pubkey33,block); return; - }*/ + } if ( pindex->didinit != 0 ) { memcpy(pubkey33,pindex->pubkey33,33); @@ -811,7 +811,7 @@ int8_t komodo_minerid(int32_t height,uint8_t *pubkey33) int32_t komodo_eligiblenotary(uint8_t pubkeys[66][33],int32_t *mids,int32_t *nonzpkeysp,int32_t height) { - int32_t i,j,duplicate; CBlockIndex *pindex; uint8_t pubkey33[33]; + int32_t i,j,duplicate; CBlock block; CBlockIndex *pindex; uint8_t pubkey33[33]; memset(mids,-1,sizeof(*mids)*66); for (i=duplicate=0; i<66; i++) { @@ -823,6 +823,8 @@ int32_t komodo_eligiblenotary(uint8_t pubkeys[66][33],int32_t *mids,int32_t *non pindex->notaryid = -1; memset(pindex->pubkey33,0,33); pindex->didinit = 0; + if ( komodo_blockload(block,pindex) == 0 ) + komodo_block2pubkey33(pindex->pubkey33,block); } if ( pindex->notaryid >= 0 && pindex->didinit != 0 ) {