public static SCPHistoryEntryV0 Decode(XdrDataInputStream stream) { SCPHistoryEntryV0 decodedSCPHistoryEntryV0 = new SCPHistoryEntryV0(); int quorumSetssize = stream.ReadInt(); decodedSCPHistoryEntryV0.QuorumSets = new SCPQuorumSet[quorumSetssize]; for (int i = 0; i < quorumSetssize; i++) { decodedSCPHistoryEntryV0.QuorumSets[i] = SCPQuorumSet.Decode(stream); } decodedSCPHistoryEntryV0.LedgerMessages = LedgerSCPMessages.Decode(stream); return(decodedSCPHistoryEntryV0); }
public static LedgerSCPMessages Decode(XdrDataInputStream stream) { LedgerSCPMessages decodedLedgerSCPMessages = new LedgerSCPMessages(); decodedLedgerSCPMessages.LedgerSeq = Uint32.Decode(stream); int messagessize = stream.ReadInt(); decodedLedgerSCPMessages.Messages = new SCPEnvelope[messagessize]; for (int i = 0; i < messagessize; i++) { decodedLedgerSCPMessages.Messages[i] = SCPEnvelope.Decode(stream); } return(decodedLedgerSCPMessages); }