-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: Upgrade to the latest XDR file. (#267)
- Loading branch information
Showing
20 changed files
with
1,426 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Automatically generated by xdrgen | ||
// DO NOT EDIT or your changes may be overwritten | ||
|
||
package org.stellar.sdk.xdr; | ||
|
||
|
||
import java.io.IOException; | ||
|
||
import java.util.Arrays; | ||
|
||
// === xdr source ============================================================ | ||
|
||
// typedef opaque EncryptedBody<64000>; | ||
|
||
// =========================================================================== | ||
public class EncryptedBody implements XdrElement { | ||
private byte[] EncryptedBody; | ||
public byte[] getEncryptedBody() { | ||
return this.EncryptedBody; | ||
} | ||
public void setEncryptedBody(byte[] value) { | ||
this.EncryptedBody = value; | ||
} | ||
public static void encode(XdrDataOutputStream stream, EncryptedBody encodedEncryptedBody) throws IOException { | ||
int EncryptedBodysize = encodedEncryptedBody.EncryptedBody.length; | ||
stream.writeInt(EncryptedBodysize); | ||
stream.write(encodedEncryptedBody.getEncryptedBody(), 0, EncryptedBodysize); | ||
} | ||
public void encode(XdrDataOutputStream stream) throws IOException { | ||
encode(stream, this); | ||
} | ||
public static EncryptedBody decode(XdrDataInputStream stream) throws IOException { | ||
EncryptedBody decodedEncryptedBody = new EncryptedBody(); | ||
int EncryptedBodysize = stream.readInt(); | ||
decodedEncryptedBody.EncryptedBody = new byte[EncryptedBodysize]; | ||
stream.read(decodedEncryptedBody.EncryptedBody, 0, EncryptedBodysize); | ||
return decodedEncryptedBody; | ||
} | ||
@Override | ||
public int hashCode() { | ||
return Arrays.hashCode(this.EncryptedBody); | ||
} | ||
@Override | ||
public boolean equals(Object object) { | ||
if (object == null || !(object instanceof EncryptedBody)) { | ||
return false; | ||
} | ||
|
||
EncryptedBody other = (EncryptedBody) object; | ||
return Arrays.equals(this.EncryptedBody, other.EncryptedBody); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// Automatically generated by xdrgen | ||
// DO NOT EDIT or your changes may be overwritten | ||
|
||
package org.stellar.sdk.xdr; | ||
|
||
|
||
import java.io.IOException; | ||
|
||
import com.google.common.base.Objects; | ||
|
||
// === xdr source ============================================================ | ||
|
||
// union LedgerCloseMeta switch (int v) | ||
// { | ||
// case 0: | ||
// LedgerCloseMetaV0 v0; | ||
// }; | ||
|
||
// =========================================================================== | ||
public class LedgerCloseMeta implements XdrElement { | ||
public LedgerCloseMeta () {} | ||
Integer v; | ||
public Integer getDiscriminant() { | ||
return this.v; | ||
} | ||
public void setDiscriminant(Integer value) { | ||
this.v = value; | ||
} | ||
private LedgerCloseMetaV0 v0; | ||
public LedgerCloseMetaV0 getV0() { | ||
return this.v0; | ||
} | ||
public void setV0(LedgerCloseMetaV0 value) { | ||
this.v0 = value; | ||
} | ||
public static void encode(XdrDataOutputStream stream, LedgerCloseMeta encodedLedgerCloseMeta) throws IOException { | ||
//Xdrgen::AST::Typespecs::Int | ||
//Integer | ||
stream.writeInt(encodedLedgerCloseMeta.getDiscriminant().intValue()); | ||
switch (encodedLedgerCloseMeta.getDiscriminant()) { | ||
case 0: | ||
LedgerCloseMetaV0.encode(stream, encodedLedgerCloseMeta.v0); | ||
break; | ||
} | ||
} | ||
public void encode(XdrDataOutputStream stream) throws IOException { | ||
encode(stream, this); | ||
} | ||
public static LedgerCloseMeta decode(XdrDataInputStream stream) throws IOException { | ||
LedgerCloseMeta decodedLedgerCloseMeta = new LedgerCloseMeta(); | ||
Integer discriminant = stream.readInt(); | ||
decodedLedgerCloseMeta.setDiscriminant(discriminant); | ||
switch (decodedLedgerCloseMeta.getDiscriminant()) { | ||
case 0: | ||
decodedLedgerCloseMeta.v0 = LedgerCloseMetaV0.decode(stream); | ||
break; | ||
} | ||
return decodedLedgerCloseMeta; | ||
} | ||
@Override | ||
public int hashCode() { | ||
return Objects.hashCode(this.v0, this.v); | ||
} | ||
@Override | ||
public boolean equals(Object object) { | ||
if (object == null || !(object instanceof LedgerCloseMeta)) { | ||
return false; | ||
} | ||
|
||
LedgerCloseMeta other = (LedgerCloseMeta) object; | ||
return Objects.equal(this.v0, other.v0) && Objects.equal(this.v, other.v); | ||
} | ||
} |
126 changes: 126 additions & 0 deletions
126
src/main/java/org/stellar/sdk/xdr/LedgerCloseMetaV0.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
// Automatically generated by xdrgen | ||
// DO NOT EDIT or your changes may be overwritten | ||
|
||
package org.stellar.sdk.xdr; | ||
|
||
|
||
import java.io.IOException; | ||
|
||
import com.google.common.base.Objects; | ||
import java.util.Arrays; | ||
|
||
// === xdr source ============================================================ | ||
|
||
// struct LedgerCloseMetaV0 | ||
// { | ||
// LedgerHeaderHistoryEntry ledgerHeader; | ||
// // NB: txSet is sorted in "Hash order" | ||
// TransactionSet txSet; | ||
// | ||
// // NB: transactions are sorted in apply order here | ||
// // fees for all transactions are processed first | ||
// // followed by applying transactions | ||
// TransactionResultMeta txProcessing<>; | ||
// | ||
// // upgrades are applied last | ||
// UpgradeEntryMeta upgradesProcessing<>; | ||
// | ||
// // other misc information attached to the ledger close | ||
// SCPHistoryEntry scpInfo<>; | ||
// }; | ||
|
||
// =========================================================================== | ||
public class LedgerCloseMetaV0 implements XdrElement { | ||
public LedgerCloseMetaV0 () {} | ||
private LedgerHeaderHistoryEntry ledgerHeader; | ||
public LedgerHeaderHistoryEntry getLedgerHeader() { | ||
return this.ledgerHeader; | ||
} | ||
public void setLedgerHeader(LedgerHeaderHistoryEntry value) { | ||
this.ledgerHeader = value; | ||
} | ||
private TransactionSet txSet; | ||
public TransactionSet getTxSet() { | ||
return this.txSet; | ||
} | ||
public void setTxSet(TransactionSet value) { | ||
this.txSet = value; | ||
} | ||
private TransactionResultMeta[] txProcessing; | ||
public TransactionResultMeta[] getTxProcessing() { | ||
return this.txProcessing; | ||
} | ||
public void setTxProcessing(TransactionResultMeta[] value) { | ||
this.txProcessing = value; | ||
} | ||
private UpgradeEntryMeta[] upgradesProcessing; | ||
public UpgradeEntryMeta[] getUpgradesProcessing() { | ||
return this.upgradesProcessing; | ||
} | ||
public void setUpgradesProcessing(UpgradeEntryMeta[] value) { | ||
this.upgradesProcessing = value; | ||
} | ||
private SCPHistoryEntry[] scpInfo; | ||
public SCPHistoryEntry[] getScpInfo() { | ||
return this.scpInfo; | ||
} | ||
public void setScpInfo(SCPHistoryEntry[] value) { | ||
this.scpInfo = value; | ||
} | ||
public static void encode(XdrDataOutputStream stream, LedgerCloseMetaV0 encodedLedgerCloseMetaV0) throws IOException{ | ||
LedgerHeaderHistoryEntry.encode(stream, encodedLedgerCloseMetaV0.ledgerHeader); | ||
TransactionSet.encode(stream, encodedLedgerCloseMetaV0.txSet); | ||
int txProcessingsize = encodedLedgerCloseMetaV0.getTxProcessing().length; | ||
stream.writeInt(txProcessingsize); | ||
for (int i = 0; i < txProcessingsize; i++) { | ||
TransactionResultMeta.encode(stream, encodedLedgerCloseMetaV0.txProcessing[i]); | ||
} | ||
int upgradesProcessingsize = encodedLedgerCloseMetaV0.getUpgradesProcessing().length; | ||
stream.writeInt(upgradesProcessingsize); | ||
for (int i = 0; i < upgradesProcessingsize; i++) { | ||
UpgradeEntryMeta.encode(stream, encodedLedgerCloseMetaV0.upgradesProcessing[i]); | ||
} | ||
int scpInfosize = encodedLedgerCloseMetaV0.getScpInfo().length; | ||
stream.writeInt(scpInfosize); | ||
for (int i = 0; i < scpInfosize; i++) { | ||
SCPHistoryEntry.encode(stream, encodedLedgerCloseMetaV0.scpInfo[i]); | ||
} | ||
} | ||
public void encode(XdrDataOutputStream stream) throws IOException { | ||
encode(stream, this); | ||
} | ||
public static LedgerCloseMetaV0 decode(XdrDataInputStream stream) throws IOException { | ||
LedgerCloseMetaV0 decodedLedgerCloseMetaV0 = new LedgerCloseMetaV0(); | ||
decodedLedgerCloseMetaV0.ledgerHeader = LedgerHeaderHistoryEntry.decode(stream); | ||
decodedLedgerCloseMetaV0.txSet = TransactionSet.decode(stream); | ||
int txProcessingsize = stream.readInt(); | ||
decodedLedgerCloseMetaV0.txProcessing = new TransactionResultMeta[txProcessingsize]; | ||
for (int i = 0; i < txProcessingsize; i++) { | ||
decodedLedgerCloseMetaV0.txProcessing[i] = TransactionResultMeta.decode(stream); | ||
} | ||
int upgradesProcessingsize = stream.readInt(); | ||
decodedLedgerCloseMetaV0.upgradesProcessing = new UpgradeEntryMeta[upgradesProcessingsize]; | ||
for (int i = 0; i < upgradesProcessingsize; i++) { | ||
decodedLedgerCloseMetaV0.upgradesProcessing[i] = UpgradeEntryMeta.decode(stream); | ||
} | ||
int scpInfosize = stream.readInt(); | ||
decodedLedgerCloseMetaV0.scpInfo = new SCPHistoryEntry[scpInfosize]; | ||
for (int i = 0; i < scpInfosize; i++) { | ||
decodedLedgerCloseMetaV0.scpInfo[i] = SCPHistoryEntry.decode(stream); | ||
} | ||
return decodedLedgerCloseMetaV0; | ||
} | ||
@Override | ||
public int hashCode() { | ||
return Objects.hashCode(this.ledgerHeader, this.txSet, Arrays.hashCode(this.txProcessing), Arrays.hashCode(this.upgradesProcessing), Arrays.hashCode(this.scpInfo)); | ||
} | ||
@Override | ||
public boolean equals(Object object) { | ||
if (object == null || !(object instanceof LedgerCloseMetaV0)) { | ||
return false; | ||
} | ||
|
||
LedgerCloseMetaV0 other = (LedgerCloseMetaV0) object; | ||
return Objects.equal(this.ledgerHeader, other.ledgerHeader) && Objects.equal(this.txSet, other.txSet) && Arrays.equals(this.txProcessing, other.txProcessing) && Arrays.equals(this.upgradesProcessing, other.upgradesProcessing) && Arrays.equals(this.scpInfo, other.scpInfo); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Automatically generated by xdrgen | ||
// DO NOT EDIT or your changes may be overwritten | ||
|
||
package org.stellar.sdk.xdr; | ||
|
||
|
||
import java.io.IOException; | ||
|
||
import java.util.Arrays; | ||
|
||
// === xdr source ============================================================ | ||
|
||
// typedef PeerStats PeerStatList<25>; | ||
|
||
// =========================================================================== | ||
public class PeerStatList implements XdrElement { | ||
private PeerStats[] PeerStatList; | ||
public PeerStats[] getPeerStatList() { | ||
return this.PeerStatList; | ||
} | ||
public void setPeerStatList(PeerStats[] value) { | ||
this.PeerStatList = value; | ||
} | ||
public static void encode(XdrDataOutputStream stream, PeerStatList encodedPeerStatList) throws IOException { | ||
int PeerStatListsize = encodedPeerStatList.getPeerStatList().length; | ||
stream.writeInt(PeerStatListsize); | ||
for (int i = 0; i < PeerStatListsize; i++) { | ||
PeerStats.encode(stream, encodedPeerStatList.PeerStatList[i]); | ||
} | ||
} | ||
public void encode(XdrDataOutputStream stream) throws IOException { | ||
encode(stream, this); | ||
} | ||
public static PeerStatList decode(XdrDataInputStream stream) throws IOException { | ||
PeerStatList decodedPeerStatList = new PeerStatList(); | ||
int PeerStatListsize = stream.readInt(); | ||
decodedPeerStatList.PeerStatList = new PeerStats[PeerStatListsize]; | ||
for (int i = 0; i < PeerStatListsize; i++) { | ||
decodedPeerStatList.PeerStatList[i] = PeerStats.decode(stream); | ||
} | ||
return decodedPeerStatList; | ||
} | ||
@Override | ||
public int hashCode() { | ||
return Arrays.hashCode(this.PeerStatList); | ||
} | ||
@Override | ||
public boolean equals(Object object) { | ||
if (object == null || !(object instanceof PeerStatList)) { | ||
return false; | ||
} | ||
|
||
PeerStatList other = (PeerStatList) object; | ||
return Arrays.equals(this.PeerStatList, other.PeerStatList); | ||
} | ||
} |
Oops, something went wrong.