Exemplo n.º 1
0
        public void TestFromReplica()
        {
            var l = MPTNode.NewLeaf(new byte[] { 0x00 });
            var n = MPTNode.NewBranch();

            n.Children[1] = l;
            var r = new MPTNode();

            r.FromReplica(n);
            Assert.AreEqual(n.Hash, r.Hash);
            Assert.AreEqual(NodeType.HashNode, r.Children[1].Type);
            Assert.AreEqual(l.Hash, r.Children[1].Hash);
        }