Browse Source

Assert that the Equihash solver is a supported option.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
pull/4/head
Daira Hopwood 8 years ago
parent
commit
5f0009b2d2
  1. 2
      src/miner.cpp

2
src/miner.cpp

@ -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);

Loading…
Cancel
Save