memset(pubkey33,0,33);
if ( pindex != 0 )
{
- if ( pindex->pubkey33[0] == 2 || pindex->pubkey33[0] == 3 )
+ if ( pindex->pubkey33[0] == 2 || pindex->pubkey33[0] == 3 || pindex->pubkey33[0] == 0xff )
{
memcpy(pubkey33,pindex->pubkey33,33);
return;
int32_t num,i,numnotaries; CBlockIndex *pindex; uint32_t timestamp=0; uint8_t _pubkey33[33],pubkeys[64][33];
if ( (pindex= chainActive[height]) != 0 )
{
- if ( (pindex->pubkey33[0] == 2 || pindex->pubkey33[0] == 3) )
+ if ( pindex->pubkey33[0] == 2 || pindex->pubkey33[0] == 3 || pindex->pubkey33[0] == 0xff )
{
if ( pubkey33 != 0 )
memcpy(pubkey33,pindex->pubkey33,33);
{
if ( (pindex= komodo_chainactive(height-i)) != 0 )
{
- if ( pindex->notaryid >= 0 && (pindex->pubkey33[0] == 2 || pindex->pubkey33[0] == 3) )
+ if ( pindex->notaryid >= 0 && (pindex->pubkey33[0] == 2 || pindex->pubkey33[0] == 3 || pindex->pubkey33[0] == 0xff) )
{
memcpy(pubkeys[i],pindex->pubkey33,33);
mids[i] = pindex->notaryid;
minerids[i] = komodo_minerid(height - i,0);
}
return(n);*/
+ fprintf(stderr,"komodo_minerids is deprecated\n");
return(-1);
}
return state.DoS(100, error("CheckBlockHeader(): Equihash solution invalid"),REJECT_INVALID, "invalid-solution");
// Check proof of work matches claimed amount
- komodo_index2pubkey33(pubkey33,pindex,height);
+ //komodo_index2pubkey33(pubkey33,pindex,height);
if ( fCheckPOW && !CheckProofOfWork(height,pubkey33,blockhdr.GetHash(), blockhdr.nBits, Params().GetConsensus()) )
return state.DoS(50, error("CheckBlockHeader(): proof of work failed"),REJECT_INVALID, "high-hash");
return true;
if ( height > 34000 && ASSETCHAINS_SYMBOL[0] == 0 ) // 0 -> non-special notary
{
if ( (pindex= komodo_chainactive(height)) != 0 )
+ {
komodo_pindex_init(pindex,height);
+ memcpy(pubkey33,pindex->pubkey33,33);
+ }
special = komodo_chosennotary(¬aryid,height,pubkey33,timestamp);
for (i=0; i<33; i++)
{