public void Mine() { var codec = new Codec(); HashAlgorithmType sha256 = HashAlgorithmType.Of <SHA256>(); PreEvaluationBlock <Arithmetic> preEvalBlock = Genesis.Mine(sha256); Assert.True(ByteUtil.Satisfies(preEvalBlock.PreEvaluationHash, Genesis.Difficulty)); AssertBytesEqual( sha256.Digest(codec.Encode(Genesis.MakeCandidateData(preEvalBlock.Nonce))), preEvalBlock.PreEvaluationHash.ToArray() ); HashAlgorithmType sha512 = HashAlgorithmType.Of <SHA512>(); preEvalBlock = Block1.Mine(sha512); Assert.True(ByteUtil.Satisfies(preEvalBlock.PreEvaluationHash, Block1.Difficulty)); AssertBytesEqual( sha512.Digest(codec.Encode(Block1.MakeCandidateData(preEvalBlock.Nonce))), preEvalBlock.PreEvaluationHash.ToArray() ); }