diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 5c41783b4..0c905e785 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -716,7 +716,7 @@ void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height) if ( komodo_blockload(block,pindex) == 0 ) { komodo_block2pubkey33(pubkey33,block); - if ( 0 && (pubkey33[0] == 2 || pubkey33[0] == 3) ) + if ( (pubkey33[0] == 2 || pubkey33[0] == 3) ) { memcpy(pindex->pubkey33,pubkey33,33); if ( (num= komodo_notaries(pubkeys,(int32_t)pindex->nHeight,(uint32_t)pindex->nTime)) > 0 ) @@ -754,7 +754,7 @@ int8_t komodo_minerid(int32_t height,uint8_t *pubkey33) 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) ) { if ( pubkey33 != 0 ) memcpy(pubkey33,pindex->pubkey33,33); @@ -806,16 +806,17 @@ int32_t komodo_eligiblenotary(uint8_t pubkeys[66][33],int32_t *mids,int32_t *non else return(0); } -int32_t komodo_minerids(uint8_t *minerids,int32_t height,int32_t width) +int32_t komodo_minerids(uint8_t *minerids,int32_t height,int32_t width) // deprecate { - int32_t i,n=0; + /*int32_t i,n=0; for (i=0; i 0 ) fprintf(stderr,"ht.%d notaryid.%d already mined -i.%d nid.%d\n",height,notaryid,i,nid); diff --git a/src/miner.cpp b/src/miner.cpp index e820c42e5..9a8eb59a5 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -523,7 +523,6 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& // // Internal miner // -int8_t komodo_minerid(int32_t height,uint8_t *pubkey33); CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) { @@ -776,12 +775,6 @@ void static BitcoinMiner() break; if ( externalflag == 0 && i != 66 ) printf("VIOLATION at %d\n",i); - for (i=0; i<66; i++) - { break; - for (j=0; j<33; j++) - printf("%02x",pubkeys[i][j]); - printf(" p%d -> %d\n",i,komodo_minerid(pindexPrev->nHeight-i,pubkeys[i])); - } for (j=gpucount=0; j<65; j++) { if ( mids[j] >= 0 || notaryid == 34 ) diff --git a/src/pow.cpp b/src/pow.cpp index 4765699d4..76960933d 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -120,7 +120,6 @@ int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33, int32_t komodo_is_special(int32_t height,uint8_t pubkey33[33],uint32_t timestamp); int32_t komodo_currentheight(); CBlockIndex *komodo_chainactive(int32_t height); -//int8_t komodo_minerid(int32_t height,uint8_t *pubkey33); void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height); extern int32_t KOMODO_CHOSEN_ONE; extern char ASSETCHAINS_SYMBOL[]; diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index bb67c7b4d..1254217ac 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -636,7 +636,7 @@ UniValue minerids(const UniValue& params, bool fHelp) if ( pblockindex != 0 ) timestamp = pblockindex->GetBlockTime(); } - if ( (n= komodo_minerids(minerids,height,(int32_t)(sizeof(minerids)/sizeof(*minerids)))) > 0 ) + if ( 0 && (n= komodo_minerids(minerids,height,(int32_t)(sizeof(minerids)/sizeof(*minerids)))) > 0 ) { memset(tally,0,sizeof(tally)); numnotaries = komodo_notaries(pubkeys,height,timestamp);