refactor(mining): surface inconclusive benchmark; dedup idle combo
- mining_benchmark: when a thread benchmark finishes with no nonzero hashrate sample (e.g. the pool never reported a rate), don't finish silently — set a new `inconclusive` flag on ThreadBenchmarkUpdate and let mining_tab warn. Keeps the state-machine core pure/no-I/O (it is unit-tested), rather than calling the Notifications singleton from it. - mining_controls: fold the two byte-identical idle-delay combo blocks (non-scaling + thread-scaling branches) into one lambda parameterised by combo id; removes ~30 lines of duplication. - request_payment: drop the dead s_selected_addr_idx state and write the address-selected comparisons as std::string == char* consistently. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -189,6 +189,11 @@ ThreadBenchmarkUpdate AdvanceThreadBenchmark(ThreadBenchmark& benchmark,
|
||||
update.startPoolMining = true;
|
||||
update.startThreads = benchmark.optimal_threads;
|
||||
}
|
||||
} else {
|
||||
// No candidate produced a nonzero hashrate (e.g. a pool that never
|
||||
// reported a rate). Don't finish silently — flag the run as
|
||||
// inconclusive so the caller can surface it (keeps this core pure).
|
||||
update.inconclusive = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user