Implementation of VerusHash CPU-friendly hash algorithm, parameters to enable it, miner, and all changes required to support it on new asset chains

This commit is contained in:
miketout
2018-04-27 00:34:50 -07:00
parent a1af306f81
commit 42181656c2
20 changed files with 1197 additions and 19 deletions

View File

@@ -9,6 +9,7 @@
#include "init.h"
#include "crypto/common.h"
#include "primitives/block.h"
#include "addrman.h"
#include "amount.h"
#ifdef ENABLE_MINING
@@ -1095,6 +1096,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
ECC_Start();
globalVerifyHandle.reset(new ECCVerifyHandle());
// set the hash algorithm to use for this chain
extern uint32_t ASSETCHAINS_ALGO, ASSETCHAINS_VERUSHASH;
if (ASSETCHAINS_ALGO == ASSETCHAINS_VERUSHASH)
CBlockHeader::SetVerusHash();
// Sanity check
if (!InitSanityCheck())
return InitError(_("Initialization sanity check failed. Komodo is shutting down."));