Ejemplo n.º 1
0
        public static void Encode(XdrDataOutputStream stream, StellarValue encodedStellarValue)
        {
            Hash.Encode(stream, encodedStellarValue.TxSetHash);
            Uint64.Encode(stream, encodedStellarValue.CloseTime);
            var upgradessize = encodedStellarValue.Upgrades.Length;

            stream.WriteInt(upgradessize);
            for (var i = 0; i < upgradessize; i++)
            {
                UpgradeType.Encode(stream, encodedStellarValue.Upgrades[i]);
            }
            StellarValueExt.Encode(stream, encodedStellarValue.Ext);
        }
        public static void Encode(IByteWriter stream, StellarValue encodedStellarValue)
        {
            Hash.Encode(stream, encodedStellarValue.TxSetHash);
            Uint64.Encode(stream, encodedStellarValue.CloseTime);
            int upgradessize = encodedStellarValue.Upgrades.Length;

            XdrEncoding.EncodeInt32(upgradessize, stream);
            for (int i = 0; i < upgradessize; i++)
            {
                UpgradeType.Encode(stream, encodedStellarValue.Upgrades[i]);
            }
            StellarValueExt.Encode(stream, encodedStellarValue.Ext);
        }