Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions Stellar-overlay.x
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ enum SurveyMessageCommandType
SURVEY_TOPOLOGY = 0
};

enum SurveyMessageResponseType
{
SURVEY_TOPOLOGY_RESPONSE_V0 = 0,
SURVEY_TOPOLOGY_RESPONSE_V1 = 1
};

struct SurveyRequestMessage
{
NodeID surveyorPeerID;
Expand Down Expand Up @@ -181,19 +187,33 @@ struct PeerStats

typedef PeerStats PeerStatList<25>;

struct TopologyResponseBody
struct TopologyResponseBodyV0
{
PeerStatList inboundPeers;
PeerStatList outboundPeers;

uint32 totalInboundPeerCount;
uint32 totalOutboundPeerCount;
};

struct TopologyResponseBodyV1
{
PeerStatList inboundPeers;
PeerStatList outboundPeers;

uint32 totalInboundPeerCount;
uint32 totalOutboundPeerCount;

uint32 maxInboundPeerCount;
uint32 maxOutboundPeerCount;
};

union SurveyResponseBody switch (SurveyMessageCommandType type)
union SurveyResponseBody switch (SurveyMessageResponseType type)
{
case SURVEY_TOPOLOGY:
TopologyResponseBody topologyResponseBody;
case SURVEY_TOPOLOGY_RESPONSE_V0:
TopologyResponseBodyV0 topologyResponseBodyV0;
case SURVEY_TOPOLOGY_RESPONSE_V1:
TopologyResponseBodyV1 topologyResponseBodyV1;
};

const TX_ADVERT_VECTOR_MAX_SIZE = 1000;
Expand Down