public void CalculateNextWorkRequiredTest(uint lastRetargetTime, int height, uint blockTime, uint bits, uint expectedResult) { var powCalculator = new ProofOfWorkCalculator( _logger, _consensusParameters, null ); var header = new BlockHeader { TimeStamp = blockTime, Bits = bits }; uint result = powCalculator.CalculateNextWorkRequired(header, lastRetargetTime); Assert.Equal(expectedResult, result); }
public uint CalculateNextWorkRequired() { return(_powCalculator.CalculateNextWorkRequired(_header, _lastRetargetTime)); }