miner: fix MAXSOLS
https://github.com/KomodoPlatform/komodo/pull/556
882bc1ff7a
This commit is contained in:
parent
317ce50622
commit
25c2b950ba
|
@ -1072,7 +1072,7 @@ void static BitcoinMiner(const CChainParams& chainparams)
|
||||||
ehSolverRuns.increment();
|
ehSolverRuns.increment();
|
||||||
|
|
||||||
// Convert solution indices to byte array (decompress) and pass it to validBlock method.
|
// Convert solution indices to byte array (decompress) and pass it to validBlock method.
|
||||||
for (size_t s = 0; s < eq.nsols; s++) {
|
for (size_t s = 0; s < std::min(MAXSOLS, eq.nsols); s++) {
|
||||||
LogPrint("pow", "Checking solution %d\n", s+1);
|
LogPrint("pow", "Checking solution %d\n", s+1);
|
||||||
std::vector<eh_index> index_vector(PROOFSIZE);
|
std::vector<eh_index> index_vector(PROOFSIZE);
|
||||||
for (size_t i = 0; i < PROOFSIZE; i++) {
|
for (size_t i = 0; i < PROOFSIZE; i++) {
|
||||||
|
|
|
@ -235,7 +235,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
|
||||||
|
|
||||||
// Convert solution indices to byte array (decompress) and pass it to validBlock method.
|
// Convert solution indices to byte array (decompress) and pass it to validBlock method.
|
||||||
std::set<std::vector<unsigned char>> solns;
|
std::set<std::vector<unsigned char>> solns;
|
||||||
for (size_t s = 0; s < eq.nsols; s++) {
|
for (size_t s = 0; s < std::min(MAXSOLS, eq.nsols); s++) {
|
||||||
LogPrint("pow", "Checking solution %d\n", s+1);
|
LogPrint("pow", "Checking solution %d\n", s+1);
|
||||||
std::vector<eh_index> index_vector(PROOFSIZE);
|
std::vector<eh_index> index_vector(PROOFSIZE);
|
||||||
for (size_t i = 0; i < PROOFSIZE; i++) {
|
for (size_t i = 0; i < PROOFSIZE; i++) {
|
||||||
|
|
Loading…
Reference in New Issue