miner: fix MAXSOLS

https://github.com/KomodoPlatform/komodo/pull/556
882bc1ff7a
This commit is contained in:
DeckerSU 2022-08-16 13:19:50 +02:00
parent 317ce50622
commit 25c2b950ba
No known key found for this signature in database
GPG Key ID: FE50480862E6451C
2 changed files with 2 additions and 2 deletions

View File

@ -1072,7 +1072,7 @@ void static BitcoinMiner(const CChainParams& chainparams)
ehSolverRuns.increment();
// 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);
std::vector<eh_index> index_vector(PROOFSIZE);
for (size_t i = 0; i < PROOFSIZE; i++) {

View File

@ -235,7 +235,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
// Convert solution indices to byte array (decompress) and pass it to validBlock method.
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);
std::vector<eh_index> index_vector(PROOFSIZE);
for (size_t i = 0; i < PROOFSIZE; i++) {