public MPTNode Node(UInt256 hash) { if (hash is null) { return(null); } var data = store.Get(hash.ToArray()); return(MPTNode.Decode(data)); }
public void TestDecode() { var n = new LeafNode { Value = Encoding.ASCII.GetBytes("hello") }; var code = n.Encode(); var m = MPTNode.Decode(code); Assert.IsInstanceOfType(m, n.GetType()); }