Portable VerusHash and CPU check
This commit is contained in:
@@ -27,6 +27,15 @@ uint256 CBlockHeader::GetVerusHash() const
|
||||
return SerializeVerusHash(*this);
|
||||
}
|
||||
|
||||
uint256 CBlockHeader::GetVerusHashPortable() const
|
||||
{
|
||||
if (hashPrevBlock.IsNull())
|
||||
// always use SHA256D for genesis block
|
||||
return SerializeHash(*this);
|
||||
else
|
||||
return SerializeVerusHashPortable(*this);
|
||||
}
|
||||
|
||||
uint256 CBlockHeader::GetVerusMiningHash() const
|
||||
{
|
||||
// no check for genesis block and use the optimized hash
|
||||
@@ -43,6 +52,11 @@ void CBlockHeader::SetVerusHash()
|
||||
CBlockHeader::hashFunction = &CBlockHeader::GetVerusHash;
|
||||
}
|
||||
|
||||
void CBlockHeader::SetVerusHashPortable()
|
||||
{
|
||||
CBlockHeader::hashFunction = &CBlockHeader::GetVerusHashPortable;
|
||||
}
|
||||
|
||||
uint256 CBlock::BuildMerkleTree(bool* fMutated) const
|
||||
{
|
||||
/* WARNING! If you're reading this because you're learning about crypto
|
||||
|
||||
Reference in New Issue
Block a user