Assert that the Equihash solver is a supported option.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2016-10-20 21:17:34 +01:00
parent f91bbeedb7
commit 5f0009b2d2
1 changed files with 2 additions and 0 deletions

View File

@ -455,6 +455,7 @@ void static BitcoinMiner(CWallet *pwallet)
unsigned int k = chainparams.EquihashK();
std::string solver = GetArg("-equihashsolver", "default");
assert(solver == "tromp" || solver == "default");
LogPrint("pow", "Using Equihash solver \"%s\" with n = %u, k = %u\n", solver, n, k);
std::mutex m_cs;
@ -564,6 +565,7 @@ void static BitcoinMiner(CWallet *pwallet)
return cancelSolver;
};
// TODO: factor this out into a function with the same API for each solver.
if (solver == "tromp") {
// Create solver and initialize it.
equi eq(1);