Test
This commit is contained in:
@@ -1277,7 +1277,7 @@ int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
|
|||||||
bnTarget.SetCompact(pblock->nBits,&fNegative,&fOverflow);
|
bnTarget.SetCompact(pblock->nBits,&fNegative,&fOverflow);
|
||||||
bhash = UintToArith256(hash);
|
bhash = UintToArith256(hash);
|
||||||
possible = komodo_block2pubkey33(pubkey33,pblock);
|
possible = komodo_block2pubkey33(pubkey33,pblock);
|
||||||
fprintf(stderr,"height.%d slowflag.%d possible.%d cmp.%d\n",height,slowflag,possible,bhash > bnTarget);
|
//fprintf(stderr,"height.%d slowflag.%d possible.%d cmp.%d\n",height,slowflag,possible,bhash > bnTarget);
|
||||||
if ( height == 0 && slowflag != 0 ) // we need to assume all prior height is in the block index
|
if ( height == 0 && slowflag != 0 ) // we need to assume all prior height is in the block index
|
||||||
{
|
{
|
||||||
if ( (pprev= mapBlockIndex[pblock->hashPrevBlock]) != 0 )
|
if ( (pprev= mapBlockIndex[pblock->hashPrevBlock]) != 0 )
|
||||||
@@ -1349,8 +1349,8 @@ int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf(stderr,"komodo_checkPOW possible.%d slowflag.%d ht.%d notaryid.%d failed.%d\n",possible,slowflag,height,notaryid,failed);
|
//fprintf(stderr,"komodo_checkPOW possible.%d slowflag.%d ht.%d notaryid.%d failed.%d\n",possible,slowflag,height,notaryid,failed);
|
||||||
if ( failed != 0 && (possible == 0 || notaryid < 0) )
|
if ( failed != 0 && possible == 0 && notaryid < 0 )
|
||||||
return(-1);
|
return(-1);
|
||||||
else return(0);
|
else return(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4133,7 +4133,7 @@ bool ProcessNewBlock(bool from_miner,int32_t height,CValidationState &state, CNo
|
|||||||
bool checked; uint256 hash;
|
bool checked; uint256 hash;
|
||||||
auto verifier = libzcash::ProofVerifier::Disabled();
|
auto verifier = libzcash::ProofVerifier::Disabled();
|
||||||
hash = pblock->GetHash();
|
hash = pblock->GetHash();
|
||||||
fprintf(stderr,"process newblock %s\n",hash.ToString().c_str());
|
//fprintf(stderr,"process newblock %s\n",hash.ToString().c_str());
|
||||||
if ( chainActive.Tip() != 0 )
|
if ( chainActive.Tip() != 0 )
|
||||||
komodo_currentheight_set(chainActive.Tip()->nHeight);
|
komodo_currentheight_set(chainActive.Tip()->nHeight);
|
||||||
checked = CheckBlock(height!=0?height:komodo_block2height(pblock),0,*pblock, state, verifier,0);
|
checked = CheckBlock(height!=0?height:komodo_block2height(pblock),0,*pblock, state, verifier,0);
|
||||||
|
|||||||
Reference in New Issue
Block a user