Exemple #1
0
                public static SCPStatementExternalize Decode(XdrDataInputStream stream)
                {
                    var decodedSCPStatementExternalize = new SCPStatementExternalize();

                    decodedSCPStatementExternalize.Commit = SCPBallot.Decode(stream);
                    decodedSCPStatementExternalize.NH     = Uint32.Decode(stream);
                    decodedSCPStatementExternalize.CommitQuorumSetHash = Hash.Decode(stream);
                    return(decodedSCPStatementExternalize);
                }
Exemple #2
0
                public static SCPStatementExternalize Decode(IByteReader stream)
                {
                    SCPStatementExternalize decodedSCPStatementExternalize = new SCPStatementExternalize();

                    decodedSCPStatementExternalize.Commit = SCPBallot.Decode(stream);
                    decodedSCPStatementExternalize.NH     = Uint32.Decode(stream);
                    decodedSCPStatementExternalize.CommitQuorumSetHash = Hash.Decode(stream);
                    return(decodedSCPStatementExternalize);
                }
Exemple #3
0
                public static SCPStatementConfirm Decode(XdrDataInputStream stream)
                {
                    var decodedSCPStatementConfirm = new SCPStatementConfirm();

                    decodedSCPStatementConfirm.Ballot        = SCPBallot.Decode(stream);
                    decodedSCPStatementConfirm.NPrepared     = Uint32.Decode(stream);
                    decodedSCPStatementConfirm.NCommit       = Uint32.Decode(stream);
                    decodedSCPStatementConfirm.NH            = Uint32.Decode(stream);
                    decodedSCPStatementConfirm.QuorumSetHash = Hash.Decode(stream);
                    return(decodedSCPStatementConfirm);
                }
Exemple #4
0
                public static SCPStatementConfirm Decode(IByteReader stream)
                {
                    SCPStatementConfirm decodedSCPStatementConfirm = new SCPStatementConfirm();

                    decodedSCPStatementConfirm.Ballot        = SCPBallot.Decode(stream);
                    decodedSCPStatementConfirm.NPrepared     = Uint32.Decode(stream);
                    decodedSCPStatementConfirm.NCommit       = Uint32.Decode(stream);
                    decodedSCPStatementConfirm.NH            = Uint32.Decode(stream);
                    decodedSCPStatementConfirm.QuorumSetHash = Hash.Decode(stream);
                    return(decodedSCPStatementConfirm);
                }
Exemple #5
0
                public static SCPStatementPrepare Decode(XdrDataInputStream stream)
                {
                    var decodedSCPStatementPrepare = new SCPStatementPrepare();

                    decodedSCPStatementPrepare.QuorumSetHash = Hash.Decode(stream);
                    decodedSCPStatementPrepare.Ballot        = SCPBallot.Decode(stream);
                    var PreparedPresent = stream.ReadInt();

                    if (PreparedPresent != 0)
                    {
                        decodedSCPStatementPrepare.Prepared = SCPBallot.Decode(stream);
                    }
                    var PreparedPrimePresent = stream.ReadInt();

                    if (PreparedPrimePresent != 0)
                    {
                        decodedSCPStatementPrepare.PreparedPrime = SCPBallot.Decode(stream);
                    }
                    decodedSCPStatementPrepare.NC = Uint32.Decode(stream);
                    decodedSCPStatementPrepare.NH = Uint32.Decode(stream);
                    return(decodedSCPStatementPrepare);
                }
Exemple #6
0
                public static SCPStatementPrepare Decode(IByteReader stream)
                {
                    SCPStatementPrepare decodedSCPStatementPrepare = new SCPStatementPrepare();

                    decodedSCPStatementPrepare.QuorumSetHash = Hash.Decode(stream);
                    decodedSCPStatementPrepare.Ballot        = SCPBallot.Decode(stream);
                    int preparedPresent = XdrEncoding.DecodeInt32(stream);

                    if (preparedPresent != 0)
                    {
                        decodedSCPStatementPrepare.Prepared = SCPBallot.Decode(stream);
                    }
                    int preparedPrimePresent = XdrEncoding.DecodeInt32(stream);

                    if (preparedPrimePresent != 0)
                    {
                        decodedSCPStatementPrepare.PreparedPrime = SCPBallot.Decode(stream);
                    }
                    decodedSCPStatementPrepare.NC = Uint32.Decode(stream);
                    decodedSCPStatementPrepare.NH = Uint32.Decode(stream);
                    return(decodedSCPStatementPrepare);
                }