Sha256: 941f7c8929a1b16b97c58279b1ff19b9e955343f6a3d5a064d23a066cf0b5c17

Contents?: true

Size: 1.63 KB

Versions: 18

Compression:

Stored size: 1.63 KB

Contents

// Copyright 2015 Stellar Development Foundation and contributors. Licensed
// under the Apache License, Version 2.0. See the COPYING file at the root
// of this distribution or at http://www.apache.org/licenses/LICENSE-2.0

%#include "generated/Stellar-ledger.h"

namespace stellar
{

struct StellarBallotValue
{
    Hash txSetHash;
    uint64 closeTime;
    uint32 baseFee;
};

struct StellarBallot
{
    uint256 nodeID;
    Signature signature;
    StellarBallotValue value;
};

struct Error
{
    int code;
    string msg<100>;
};

struct Hello
{
    int protocolVersion;
    string versionStr<100>;
    int listeningPort;
    opaque peerID[32];
};

struct PeerAddress
{
    opaque ip[4];
    uint32 port;
    uint32 numFailures;
};

enum MessageType
{
    ERROR_MSG = 0,
    HELLO = 1,
    DONT_HAVE = 2,

    GET_PEERS = 3, // gets a list of peers this guy knows about
    PEERS = 4,

    GET_TX_SET = 5, // gets a particular txset by hash
    TX_SET = 6,

    TRANSACTION = 7, // pass on a tx you have heard about

    // SCP
    GET_SCP_QUORUMSET = 8,
    SCP_QUORUMSET = 9,
    SCP_MESSAGE = 10
};

struct DontHave
{
    MessageType type;
    uint256 reqHash;
};

union StellarMessage switch (MessageType type)
{
case ERROR_MSG:
    Error error;
case HELLO:
    Hello hello;
case DONT_HAVE:
    DontHave dontHave;
case GET_PEERS:
    void;
case PEERS:
    PeerAddress peers<>;

case GET_TX_SET:
    uint256 txSetHash;
case TX_SET:
    TransactionSet txSet;

case TRANSACTION:
    TransactionEnvelope transaction;

// SCP
case GET_SCP_QUORUMSET:
    uint256 qSetHash;
case SCP_QUORUMSET:
    SCPQuorumSet qSet;
case SCP_MESSAGE:
    SCPEnvelope envelope;
};
}

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
stellar-base-0.0.18 xdr/Stellar-overlay.x
stellar-base-0.0.17 xdr/Stellar-overlay.x
stellar-base-0.0.16 xdr/Stellar-overlay.x
stellar-base-0.0.15 xdr/Stellar-overlay.x
stellar-base-0.0.14 xdr/Stellar-overlay.x
stellar-base-0.0.13 xdr/Stellar-overlay.x
stellar-base-0.0.12 xdr/Stellar-overlay.x
stellar-base-0.0.11 xdr/Stellar-overlay.x
stellar-base-0.0.10 xdr/Stellar-overlay.x
stellar-base-0.0.9 xdr/Stellar-overlay.x
stellar-base-0.0.8 xdr/Stellar-overlay.x
stellar-base-0.0.7 xdr/Stellar-overlay.x
stellar-base-0.0.6 xdr/Stellar-overlay.x
stellar-base-0.0.5 xdr/Stellar-overlay.x
stellar-base-0.0.4 xdr/Stellar-overlay.x
stellar-base-0.0.3 xdr/Stellar-overlay.x
stellar-base-0.0.2 xdr/Stellar-overlay.x
stellar-base-0.0.1 xdr/Stellar-overlay.x