This commit is contained in:
jl777
2016-11-18 07:54:53 -03:00
parent 6034c671dc
commit 42c75f1f02

View File

@@ -468,10 +468,16 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height);
int8_t komodo_minerid(int32_t height) int8_t komodo_minerid(int32_t height)
{ {
//static uint32_t depth; //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 ( (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 ( gettxout_scriptPubKey(script,sizeof(script),block.vtx[0].GetHash(),0) == 35 )
{ {
if ( (num= komodo_notaries(pubkeys,height)) > 0 ) if ( (num= komodo_notaries(pubkeys,height)) > 0 )
{ {
@@ -484,6 +490,7 @@ int8_t komodo_minerid(int32_t height)
} }
} }
} }
}
return(-1); return(-1);
/*if ( Minerids[height] >= -1 ) /*if ( Minerids[height] >= -1 )
{ {