diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index ee7c46c78..6761855dd 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -468,19 +468,26 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height); int8_t komodo_minerid(int32_t height) { //static uint32_t depth; - int32_t notaryid,num,i; CBlockIndex *pindex; uint8_t pubkeys[64][33],script[35]; + CBlock block; int32_t notaryid,num,i; CBlockIndex *pindex; uint8_t pubkeys[64][33],script[35]; if ( (pindex= chainActive[height]) != 0 ) { - if ( gettxout_scriptPubKey(script,sizeof(script),pindex->block.vtx[0].GetHash(),0) == 35 ) + if ( ReadBlockFromDisk(block,(const CBlockIndex *)pindex +#ifndef KOMODO_ZCASH + ,Params().GetConsensus() +#endif + ) != 0 ) { - if ( (num= komodo_notaries(pubkeys,height)) > 0 ) + if ( gettxout_scriptPubKey(script,sizeof(script),block.vtx[0].GetHash(),0) == 35 ) { - for (i=0; i 0 ) + { + for (i=0; i