Skip to content

Commit

Permalink
Update overlay XDR (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
marta-lokhova authored Jan 11, 2023
1 parent 026c9cd commit d2acf41
Showing 1 changed file with 24 additions and 4 deletions.
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

0 comments on commit d2acf41

Please sign in to comment.