test
This commit is contained in:
@@ -2973,7 +2973,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
|
|||||||
|
|
||||||
// Check that the header is valid (particularly PoW). This is mostly
|
// Check that the header is valid (particularly PoW). This is mostly
|
||||||
// redundant with the call in AcceptBlockHeader.
|
// redundant with the call in AcceptBlockHeader.
|
||||||
if (!CheckBlockHeader(block, block, state, fCheckPOW))
|
if (!CheckBlockHeader(height,block, block, state, fCheckPOW))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Check the merkle root.
|
// Check the merkle root.
|
||||||
@@ -3130,7 +3130,7 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CheckBlockHeader(block, block, state))
|
if (!CheckBlockHeader(pindex->nHeight,block, block, state))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Get prev block index
|
// Get prev block index
|
||||||
|
|||||||
@@ -409,7 +409,7 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
|
|||||||
bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool fJustCheck = false);
|
bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool fJustCheck = false);
|
||||||
|
|
||||||
/** Context-independent validity checks */
|
/** Context-independent validity checks */
|
||||||
bool CheckBlockHeader(const CBlock& block, const CBlockHeader& blockhdr, CValidationState& state, bool fCheckPOW = true);
|
bool CheckBlockHeader(int32_t height,const CBlock& block, const CBlockHeader& blockhdr, CValidationState& state, bool fCheckPOW = true);
|
||||||
bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW = true, bool fCheckMerkleRoot = true);
|
bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW = true, bool fCheckMerkleRoot = true);
|
||||||
|
|
||||||
/** Context-dependent validity checks */
|
/** Context-dependent validity checks */
|
||||||
|
|||||||
Reference in New Issue
Block a user