This commit is contained in:
jl777
2018-04-17 20:54:10 +03:00
parent e14d2c31c3
commit 0d8dc237cd
2 changed files with 3 additions and 1 deletions

View File

@@ -843,7 +843,6 @@ int32_t komodo_minerids(uint8_t *minerids,int32_t height,int32_t width)
{ {
if ( height-i <= 0 ) if ( height-i <= 0 )
continue; continue;
minerids[nonz] = numnotaries;
if ( (pindex= komodo_chainactive(height-width+i+1)) != 0 ) if ( (pindex= komodo_chainactive(height-width+i+1)) != 0 )
{ {
if ( komodo_blockload(block,pindex) == 0 ) if ( komodo_blockload(block,pindex) == 0 )
@@ -857,6 +856,8 @@ int32_t komodo_minerids(uint8_t *minerids,int32_t height,int32_t width)
break; break;
} }
} }
if ( j == numnotaries )
minerids[nonz++] = j;
} else fprintf(stderr,"couldnt load block.%d\n",height); } else fprintf(stderr,"couldnt load block.%d\n",height);
} }
} }

View File

@@ -1048,6 +1048,7 @@ UniValue minerids(const UniValue& params, bool fHelp)
a.push_back(item); a.push_back(item);
} }
ret.push_back(Pair("mined", a)); ret.push_back(Pair("mined", a));
ret.push_back(Pair("numnotaries", numnotaries));
} else ret.push_back(Pair("error", (char *)"couldnt extract minerids")); } else ret.push_back(Pair("error", (char *)"couldnt extract minerids"));
return ret; return ret;
} }