This commit is contained in:
jl777
2016-11-13 07:53:14 -03:00
parent cfbf96d10a
commit 0a39e8f1ed

View File

@@ -449,13 +449,16 @@ void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height)
int8_t komodo_minerid(int32_t height)
{
static uint32_t depth;
int32_t notaryid; CBlockIndex *pindex; uint8_t pubkey33[33];
if ( height <= CURRENT_HEIGHT )//chainActive.Tip()->nHeight )
if ( depth == 0 && height <= CURRENT_HEIGHT )//chainActive.Tip()->nHeight )
{
if ( (pindex= chainActive[height]) != 0 )
{
depth++;
komodo_index2pubkey33(pubkey33,pindex,height);
komodo_chosennotary(&notaryid,height,pubkey33);
depth--;
return(notaryid);
}
}