public static LedgerCloseMetaV0 Decode(XdrDataInputStream stream)
        {
            LedgerCloseMetaV0 decodedLedgerCloseMetaV0 = new LedgerCloseMetaV0();

            decodedLedgerCloseMetaV0.LedgerHeader = LedgerHeaderHistoryEntry.Decode(stream);
            decodedLedgerCloseMetaV0.TxSet        = TransactionSet.Decode(stream);
            int txProcessingsize = stream.ReadInt();

            decodedLedgerCloseMetaV0.TxProcessing = new TransactionResultMeta[txProcessingsize];
            for (int i = 0; i < txProcessingsize; i++)
            {
                decodedLedgerCloseMetaV0.TxProcessing[i] = TransactionResultMeta.Decode(stream);
            }
            int upgradesProcessingsize = stream.ReadInt();

            decodedLedgerCloseMetaV0.UpgradesProcessing = new UpgradeEntryMeta[upgradesProcessingsize];
            for (int i = 0; i < upgradesProcessingsize; i++)
            {
                decodedLedgerCloseMetaV0.UpgradesProcessing[i] = UpgradeEntryMeta.Decode(stream);
            }
            int scpInfosize = stream.ReadInt();

            decodedLedgerCloseMetaV0.ScpInfo = new SCPHistoryEntry[scpInfosize];
            for (int i = 0; i < scpInfosize; i++)
            {
                decodedLedgerCloseMetaV0.ScpInfo[i] = SCPHistoryEntry.Decode(stream);
            }
            return(decodedLedgerCloseMetaV0);
        }
        public static void Encode(XdrDataOutputStream stream, LedgerCloseMetaV0 encodedLedgerCloseMetaV0)
        {
            LedgerHeaderHistoryEntry.Encode(stream, encodedLedgerCloseMetaV0.LedgerHeader);
            TransactionSet.Encode(stream, encodedLedgerCloseMetaV0.TxSet);
            int txProcessingsize = encodedLedgerCloseMetaV0.TxProcessing.Length;

            stream.WriteInt(txProcessingsize);
            for (int i = 0; i < txProcessingsize; i++)
            {
                TransactionResultMeta.Encode(stream, encodedLedgerCloseMetaV0.TxProcessing[i]);
            }
            int upgradesProcessingsize = encodedLedgerCloseMetaV0.UpgradesProcessing.Length;

            stream.WriteInt(upgradesProcessingsize);
            for (int i = 0; i < upgradesProcessingsize; i++)
            {
                UpgradeEntryMeta.Encode(stream, encodedLedgerCloseMetaV0.UpgradesProcessing[i]);
            }
            int scpInfosize = encodedLedgerCloseMetaV0.ScpInfo.Length;

            stream.WriteInt(scpInfosize);
            for (int i = 0; i < scpInfosize; i++)
            {
                SCPHistoryEntry.Encode(stream, encodedLedgerCloseMetaV0.ScpInfo[i]);
            }
        }
        public static LedgerHeaderHistoryEntry Decode(XdrDataInputStream stream)
        {
            LedgerHeaderHistoryEntry decodedLedgerHeaderHistoryEntry = new LedgerHeaderHistoryEntry();

            decodedLedgerHeaderHistoryEntry.Hash   = Hash.Decode(stream);
            decodedLedgerHeaderHistoryEntry.Header = LedgerHeader.Decode(stream);
            decodedLedgerHeaderHistoryEntry.Ext    = LedgerHeaderHistoryEntryExt.Decode(stream);
            return(decodedLedgerHeaderHistoryEntry);
        }
 public static void Encode(XdrDataOutputStream stream, LedgerHeaderHistoryEntry encodedLedgerHeaderHistoryEntry)
 {
     Hash.Encode(stream, encodedLedgerHeaderHistoryEntry.Hash);
     LedgerHeader.Encode(stream, encodedLedgerHeaderHistoryEntry.Header);
     LedgerHeaderHistoryEntryExt.Encode(stream, encodedLedgerHeaderHistoryEntry.Ext);
 }