Ejemplo n.º 1
0
        public void Deposit_data_there_and_back()
        {
            DepositData container = new DepositData(
                TestKey1,
                Sha256.Bytes32OfAnEmptyString,
                Gwei.One,
                TestSig1);
            Span <byte> encoded = new byte[Ssz.DepositDataLength];

            Ssz.Encode(encoded, container);
            DepositData decoded = Ssz.DecodeDepositData(encoded);

            Assert.AreEqual(container, decoded);

            Merkle.Ize(out UInt256 root, container);
        }
Ejemplo n.º 2
0
        public void Deposit_data_there_and_back()
        {
            DepositData container = new DepositData();

            container.PublicKey             = BlsPublicKey.TestKey1;
            container.WithdrawalCredentials = Sha256.OfAnEmptyString;
            container.Amount    = Gwei.One;
            container.Signature = BlsSignature.TestSig1;
            Span <byte> encoded = new byte[DepositData.SszLength];

            Ssz.Encode(encoded, container);
            DepositData decoded = Ssz.DecodeDepositData(encoded);

            Assert.AreEqual(container, decoded);

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