Test
This commit is contained in:
@@ -1264,16 +1264,16 @@ int32_t komodo_is_PoSblock(int32_t slowflag,int32_t height,CBlock *pblock,arith_
|
|||||||
int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
|
int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
|
||||||
{
|
{
|
||||||
uint256 hash; arith_uint256 bnTarget,bhash; bool fNegative,fOverflow; uint8_t *script,pubkey33[33],pubkeys[64][33]; int32_t i,PoSperc,is_PoSblock=0,n,failed = 0,notaryid = -1; int64_t checktoshis,value;
|
uint256 hash; arith_uint256 bnTarget,bhash; bool fNegative,fOverflow; uint8_t *script,pubkey33[33],pubkeys[64][33]; int32_t i,PoSperc,is_PoSblock=0,n,failed = 0,notaryid = -1; int64_t checktoshis,value;
|
||||||
if ( height == 0 )
|
|
||||||
{
|
|
||||||
fprintf(stderr,"komodo_checkPOW slowflag.%d ht.%d null\n",slowflag,height);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
if ( !CheckEquihashSolution(pblock, Params()) )
|
if ( !CheckEquihashSolution(pblock, Params()) )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"komodo_checkPOW slowflag.%d ht.%d CheckEquihashSolution failed\n",slowflag,height);
|
fprintf(stderr,"komodo_checkPOW slowflag.%d ht.%d CheckEquihashSolution failed\n",slowflag,height);
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
if ( height == 0 )
|
||||||
|
{
|
||||||
|
fprintf(stderr,"komodo_checkPOW slowflag.%d ht.%d null\n",slowflag,height);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
bnTarget.SetCompact(pblock->nBits,&fNegative,&fOverflow);
|
bnTarget.SetCompact(pblock->nBits,&fNegative,&fOverflow);
|
||||||
hash = pblock->GetHash();
|
hash = pblock->GetHash();
|
||||||
bhash = UintToArith256(hash);
|
bhash = UintToArith256(hash);
|
||||||
|
|||||||
Reference in New Issue
Block a user