public void LeftHashVerificationTest() { MerkleNode parentNode = new MerkleNode(); MerkleNode leftNode = new MerkleNode(); leftNode.ComputeHash(Encoding.UTF8.GetBytes("abc")); parentNode.SetLeftNode(leftNode); parentNode.VerifyHash().Should().BeTrue(); }
public void VerifyTwoLevelTree() { MerkleNode parentNode1 = CreateParentNode("abc", "def"); MerkleNode parentNode2 = CreateParentNode("123", "456"); MerkleNode rootNode = new MerkleNode(); rootNode.SetLeftNode(parentNode1); rootNode.SetRightNode(parentNode2); rootNode.VerifyHash().Should().BeTrue(); }
public void VerifyLeftHash() { MerkleNode left = new MerkleNode(); left.Hash = new MerkleHash("aelf"); MerkleNode parent = new MerkleNode(); parent.SetLeftNode(left); Assert.True(parent.VerifyHash()); }
public void LeftRightHashVerificationTest() { MerkleNode parentNode = CreateParentNode("abc", "def"); parentNode.VerifyHash().Should().BeTrue(); }
public void VerifyHash() { MerkleNode parent = CreateNode("ae", "lf"); Assert.True(parent.VerifyHash()); }
public void LeftRightHashVerificationTest() { MerkleNode parentNode = CreateParentNode("abc", "def"); Assert.True(parentNode.VerifyHash()); }