Ejemplo n.º 1
0
        public void Checkpoint_there_and_back()
        {
            Checkpoint  container = new Checkpoint(new Epoch(1), Sha256.OfAnEmptyString);
            Span <byte> encoded   = new byte[Checkpoint.SszLength];

            Ssz.Encode(encoded, container);
            Checkpoint decoded = Ssz.DecodeCheckpoint(encoded);

            Assert.AreEqual(container, decoded);

            Merkle.Ize(out UInt256 root, container);
        }