public void Solve() { byte[] solution = null; var d = new Difficulty(_difficulty); var result = BeamHash3.Solve(_input, _nonce, x => { BeamHash3.IsValidSolution(_input, _nonce, x).Should().BeTrue(); if (!Difficulty.TestDifficulty(x, _difficulty)) { return(false); } solution = x; return(true); }); result.Should().BeTrue(); solution.SequenceEqual(_solution).Should().BeTrue(); }
public void CheckValidationOfInvalidSolution() { _solution[0] = 0; BeamHash3.IsValidSolution(_input, _nonce, _solution).Should().BeFalse(); }
public void CheckIsValidSolution() { BeamHash3.IsValidSolution(_input, _nonce, _solution).Should().BeTrue(); }