Test
This commit is contained in:
@@ -815,8 +815,9 @@ int32_t komodo_eligiblenotary(uint8_t pubkeys[66][33],int32_t *mids,int32_t *non
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
komodo_index2pubkey33(pubkey33,pindex,height-i);
|
pindex_komodo_init(pindex,height-i);
|
||||||
memcpy(pubkeys[i],pubkey33,33);
|
//komodo_index2pubkey33(pubkey33,pindex,height-i);
|
||||||
|
memcpy(pubkeys[i],pindex->pubkey33,33);
|
||||||
if ( (mids[i]= komodo_minerid(height-i,pubkey33)) >= 0 )
|
if ( (mids[i]= komodo_minerid(height-i,pubkey33)) >= 0 )
|
||||||
{
|
{
|
||||||
//mids[i] = *(int32_t *)pubkey33;
|
//mids[i] = *(int32_t *)pubkey33;
|
||||||
|
|||||||
@@ -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)
|
bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned int nBits, const Consensus::Params& params)
|
||||||
{
|
{
|
||||||
extern int32_t KOMODO_REWIND;
|
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];
|
arith_uint256 bnTarget; uint8_t pubkeys[66][33];
|
||||||
timestamp = komodo_chainactive_timestamp();
|
timestamp = komodo_chainactive_timestamp();
|
||||||
bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
|
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++)
|
for (i=0; i<66; i++)
|
||||||
printf("%d ",mids[i]);
|
printf("%d ",mids[i]);
|
||||||
printf(" minerids from ht.%d\n",height);
|
printf(" minerids from ht.%d\n",height);
|
||||||
if ( KOMODO_LOADINGBLOCKS == 0 )
|
//if ( KOMODO_LOADINGBLOCKS == 0 )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user