Portable VerusHash and CPU check

This commit is contained in:
Michael Toutonghi
2018-06-16 14:51:13 -07:00
parent 2c05c25598
commit 5296a85018
10 changed files with 537 additions and 5 deletions

View File

@@ -1103,7 +1103,16 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// set the hash algorithm to use for this chain
extern uint32_t ASSETCHAINS_ALGO, ASSETCHAINS_VERUSHASH;
if (ASSETCHAINS_ALGO == ASSETCHAINS_VERUSHASH)
CBlockHeader::SetVerusHash();
{
// if we must run portable, do so
if (IsCPUVerusOptimized())
{
CBlockHeader::SetVerusHash();
}
else{
CBlockHeader::SetVerusHashPortable();
}
}
// Sanity check
if (!InitSanityCheck())