Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated XDR to latest version. #587

Merged
merged 2 commits into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"test:browser": "karma start ./config/karma.conf.js",
"docs": "jsdoc -c ./config/.jsdoc.json --verbose",
"lint": "eslint -c ./config/.eslintrc.js src/ && dtslint --localTs node_modules/typescript/lib types/",
"preversion": "yarn clean && yarn pretty && yarn lint && yarn build:prod && yarn test",
"preversion": "yarn clean && yarn fmt && yarn lint && yarn build:prod && yarn test",
"fmt": "prettier --config ./config/prettier.config.js --ignore-path ./config/.prettierignore --write './**/*.js'",
"prepare": "yarn build:prod",
"clean": "rm -rf lib/ dist/ coverage/ .nyc_output/"
Expand Down
81 changes: 76 additions & 5 deletions src/generated/curr_generated.js
Original file line number Diff line number Diff line change
Expand Up @@ -2847,18 +2847,23 @@ xdr.struct("Hello", [
["nonce", xdr.lookup("Uint256")],
]);

// === xdr source ============================================================
//
// const AUTH_MSG_FLAG_PULL_MODE_REQUESTED = 100;
//
// ===========================================================================
xdr.const("AUTH_MSG_FLAG_PULL_MODE_REQUESTED", 100);

// === xdr source ============================================================
//
// struct Auth
// {
// // Empty message, just to confirm
// // establishment of MAC keys.
// int unused;
// int flags;
// };
//
// ===========================================================================
xdr.struct("Auth", [
["unused", xdr.int()],
["flags", xdr.int()],
]);

// === xdr source ============================================================
Expand Down Expand Up @@ -2951,7 +2956,9 @@ xdr.struct("PeerAddress", [
// SURVEY_REQUEST = 14,
// SURVEY_RESPONSE = 15,
//
// SEND_MORE = 16
// SEND_MORE = 16,
// FLOOD_ADVERT = 18,
// FLOOD_DEMAND = 19
// };
//
// ===========================================================================
Expand All @@ -2973,6 +2980,8 @@ xdr.enum("MessageType", {
surveyRequest: 14,
surveyResponse: 15,
sendMore: 16,
floodAdvert: 18,
floodDemand: 19,
});

// === xdr source ============================================================
Expand Down Expand Up @@ -3164,6 +3173,58 @@ xdr.union("SurveyResponseBody", {
},
});

// === xdr source ============================================================
//
// const TX_ADVERT_VECTOR_MAX_SIZE = 1000;
//
// ===========================================================================
xdr.const("TX_ADVERT_VECTOR_MAX_SIZE", 1000);

// === xdr source ============================================================
//
// typedef Hash TxAdvertVector<TX_ADVERT_VECTOR_MAX_SIZE>;
//
// ===========================================================================
xdr.typedef("TxAdvertVector", xdr.varArray(xdr.lookup("Hash"), xdr.lookup("TX_ADVERT_VECTOR_MAX_SIZE")));

// === xdr source ============================================================
//
// struct FloodAdvert
// {
// TxAdvertVector txHashes;
// };
//
// ===========================================================================
xdr.struct("FloodAdvert", [
["txHashes", xdr.lookup("TxAdvertVector")],
]);

// === xdr source ============================================================
//
// const TX_DEMAND_VECTOR_MAX_SIZE = 1000;
//
// ===========================================================================
xdr.const("TX_DEMAND_VECTOR_MAX_SIZE", 1000);

// === xdr source ============================================================
//
// typedef Hash TxDemandVector<TX_DEMAND_VECTOR_MAX_SIZE>;
//
// ===========================================================================
xdr.typedef("TxDemandVector", xdr.varArray(xdr.lookup("Hash"), xdr.lookup("TX_DEMAND_VECTOR_MAX_SIZE")));

// === xdr source ============================================================
//
// struct FloodDemand
// {
// TxDemandVector txHashes;
// };
//
// ===========================================================================
xdr.struct("FloodDemand", [
["txHashes", xdr.lookup("TxDemandVector")],
]);

// === xdr source ============================================================
//
// union StellarMessage switch (MessageType type)
Expand Down Expand Up @@ -3208,6 +3269,12 @@ xdr.union("SurveyResponseBody", {
// uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest
// case SEND_MORE:
// SendMore sendMoreMessage;
//
// // Pull mode
// case FLOOD_ADVERT:
// FloodAdvert floodAdvert;
// case FLOOD_DEMAND:
// FloodDemand floodDemand;
// };
//
// ===========================================================================
Expand All @@ -3232,6 +3299,8 @@ xdr.union("StellarMessage", {
["scpMessage", "envelope"],
["getScpState", "getScpLedgerSeq"],
["sendMore", "sendMoreMessage"],
["floodAdvert", "floodAdvert"],
["floodDemand", "floodDemand"],
],
arms: {
error: xdr.lookup("Error"),
Expand All @@ -3250,6 +3319,8 @@ xdr.union("StellarMessage", {
envelope: xdr.lookup("ScpEnvelope"),
getScpLedgerSeq: xdr.lookup("Uint32"),
sendMoreMessage: xdr.lookup("SendMore"),
floodAdvert: xdr.lookup("FloodAdvert"),
floodDemand: xdr.lookup("FloodDemand"),
},
});

Expand Down
Loading