示例#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);
                }
示例#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);
                }
示例#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);
                }
示例#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);
                }
示例#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);
                }
示例#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);
                }