test
This commit is contained in:
@@ -1343,7 +1343,7 @@ bool ReadBlockFromDisk(int32_t height,CBlock& block, const CDiskBlockPos& pos)
|
|||||||
if (filein.IsNull())
|
if (filein.IsNull())
|
||||||
{
|
{
|
||||||
//fprintf(stderr,"readblockfromdisk err A\n");
|
//fprintf(stderr,"readblockfromdisk err A\n");
|
||||||
return false; //error("ReadBlockFromDisk: OpenBlockFile failed for %s", pos.ToString());
|
return error("ReadBlockFromDisk: OpenBlockFile failed for %s", pos.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read block
|
// Read block
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
|||||||
pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]);
|
pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]);
|
||||||
|
|
||||||
CValidationState state;
|
CValidationState state;
|
||||||
if (!TestBlockValidity(state, *pblock, pindexPrev, false, false))
|
if ( 0 && !TestBlockValidity(state, *pblock, pindexPrev, false, false))
|
||||||
throw std::runtime_error("CreateNewBlock(): TestBlockValidity failed");
|
throw std::runtime_error("CreateNewBlock(): TestBlockValidity failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,6 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
|
|||||||
// Check range
|
// Check range
|
||||||
if (fNegative || bnTarget == 0 || fOverflow || bnTarget > UintToArith256(params.powLimit))
|
if (fNegative || bnTarget == 0 || fOverflow || bnTarget > UintToArith256(params.powLimit))
|
||||||
return error("CheckProofOfWork(): nBits below minimum work");
|
return error("CheckProofOfWork(): nBits below minimum work");
|
||||||
|
|
||||||
// Check proof of work matches claimed amount
|
// Check proof of work matches claimed amount
|
||||||
if (UintToArith256(hash) > bnTarget)
|
if (UintToArith256(hash) > bnTarget)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user