This commit is contained in:
jl777
2018-04-13 16:43:06 +03:00
parent 8c8dce0870
commit 26190fd177
2 changed files with 5 additions and 4 deletions

View File

@@ -815,8 +815,9 @@ int32_t komodo_eligiblenotary(uint8_t pubkeys[66][33],int32_t *mids,int32_t *non
}
else
{
komodo_index2pubkey33(pubkey33,pindex,height-i);
memcpy(pubkeys[i],pubkey33,33);
pindex_komodo_init(pindex,height-i);
//komodo_index2pubkey33(pubkey33,pindex,height-i);
memcpy(pubkeys[i],pindex->pubkey33,33);
if ( (mids[i]= komodo_minerid(height-i,pubkey33)) >= 0 )
{
//mids[i] = *(int32_t *)pubkey33;

View File

@@ -134,7 +134,7 @@ extern std::string NOTARY_PUBKEY;
bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned int nBits, const Consensus::Params& params)
{
extern int32_t KOMODO_REWIND;
bool fNegative,fOverflow; int32_t i,nonzpkeys=0,nonz=0,special=0,special2=0,notaryid=-1,flag = 0, mids[66]; uint32_t timestamp = 0;
bool fNegative,fOverflow; int32_t i,nonzpkeys=0,nonz=0,special=0,special2=0,notaryid=-1,flag = 0, mids[66]; uint32_t timestamp = 0; CBlockIndex *pindex;
arith_uint256 bnTarget; uint8_t pubkeys[66][33];
timestamp = komodo_chainactive_timestamp();
bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
@@ -195,7 +195,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
for (i=0; i<66; i++)
printf("%d ",mids[i]);
printf(" minerids from ht.%d\n",height);
if ( KOMODO_LOADINGBLOCKS == 0 )
//if ( KOMODO_LOADINGBLOCKS == 0 )
return false;
}
return true;