This commit is contained in:
jl777
2018-04-19 23:18:23 +03:00
parent 13b8b2ed26
commit f1b57a6e76

View File

@@ -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)
{
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()) )
{
fprintf(stderr,"komodo_checkPOW slowflag.%d ht.%d CheckEquihashSolution failed\n",slowflag,height);
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);
hash = pblock->GetHash();
bhash = UintToArith256(hash);