Merge branch 'new_staker' into mastertest
This commit is contained in:
@@ -46,8 +46,11 @@ uint256 CBlockHeader::GetVerusHash() const
|
||||
|
||||
uint256 CBlockHeader::GetVerusV2Hash() const
|
||||
{
|
||||
// no check for genesis block and use the optimized hash
|
||||
return SerializeVerusHashV2(*this);
|
||||
if (hashPrevBlock.IsNull())
|
||||
// always use SHA256D for genesis block
|
||||
return SerializeHash(*this);
|
||||
else
|
||||
return SerializeVerusHashV2(*this);
|
||||
}
|
||||
|
||||
void CBlockHeader::SetSHA256DHash()
|
||||
@@ -60,6 +63,11 @@ void CBlockHeader::SetVerusHash()
|
||||
CBlockHeader::hashFunction = &CBlockHeader::GetVerusHash;
|
||||
}
|
||||
|
||||
void CBlockHeader::SetVerusHashV2()
|
||||
{
|
||||
CBlockHeader::hashFunction = &CBlockHeader::GetVerusV2Hash;
|
||||
}
|
||||
|
||||
// returns false if unable to fast calculate the VerusPOSHash from the header.
|
||||
// if it returns false, value is set to 0, but it can still be calculated from the full block
|
||||
// in that case. the only difference between this and the POS hash for the contest is that it is not divided by the value out
|
||||
|
||||
Reference in New Issue
Block a user