Add mostly-static checks on consistency of Equihash parameters, MAX_HEADERS_RESULTS, and MAX_PROTOCOL_MESSAGE_LENGTH.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
@@ -155,6 +155,10 @@ class EhSolverCancelledException : public std::exception
|
||||
|
||||
inline constexpr const size_t max(const size_t A, const size_t B) { return A > B ? A : B; }
|
||||
|
||||
inline constexpr size_t equihash_solution_size(unsigned int N, unsigned int K) {
|
||||
return (1 << K)*(N/(K+1)+1)/8;
|
||||
}
|
||||
|
||||
template<unsigned int N, unsigned int K>
|
||||
class Equihash
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user