Package org.stellar.sdk.xdr
Class LedgerHeader
java.lang.Object
org.stellar.sdk.xdr.LedgerHeader
LedgerHeader's original definition in the XDR file is:
struct LedgerHeader { uint32 ledgerVersion; // the protocol version of the ledger Hash previousLedgerHash; // hash of the previous ledger header StellarValue scpValue; // what consensus agreed to Hash txSetResultHash; // the TransactionResultSet that led to this ledger Hash bucketListHash; // hash of the ledger state uint32 ledgerSeq; // sequence number of this ledger int64 totalCoins; // total number of stroops in existence. // 10,000,000 stroops in 1 XLM int64 feePool; // fees burned since last inflation run uint32 inflationSeq; // inflation sequence number uint64 idPool; // last used global ID, used for generating objects uint32 baseFee; // base fee per operation in stroops uint32 baseReserve; // account base reserve in stroops uint32 maxTxSetSize; // maximum size a transaction set can be Hash skipList[4]; // hashes of ledgers in the past. allows you to jump back // in time without walking the chain back ledger by ledger // each slot contains the oldest ledger that is mod of // either 50 5000 50000 or 500000 depending on index // skipList[0] mod(50), skipList[1] mod(5000), etc // reserved for future use union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ext; };
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
LedgerHeaderExt's original definition in the XDR file is: -
Constructor Summary
ConstructorDescriptionLedgerHeader
(Uint32 ledgerVersion, Hash previousLedgerHash, StellarValue scpValue, Hash txSetResultHash, Hash bucketListHash, Uint32 ledgerSeq, Int64 totalCoins, Int64 feePool, Uint32 inflationSeq, Uint64 idPool, Uint32 baseFee, Uint32 baseReserve, Uint32 maxTxSetSize, Hash[] skipList, LedgerHeader.LedgerHeaderExt ext) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
static LedgerHeader
decode
(XdrDataInputStream stream) void
encode
(XdrDataOutputStream stream) boolean
static LedgerHeader
fromXdrBase64
(String xdr) static LedgerHeader
fromXdrByteArray
(byte[] xdr) getExt()
Hash[]
int
hashCode()
void
setBaseFee
(Uint32 baseFee) void
setBaseReserve
(Uint32 baseReserve) void
setBucketListHash
(Hash bucketListHash) void
void
setFeePool
(Int64 feePool) void
void
setInflationSeq
(Uint32 inflationSeq) void
setLedgerSeq
(Uint32 ledgerSeq) void
setLedgerVersion
(Uint32 ledgerVersion) void
setMaxTxSetSize
(Uint32 maxTxSetSize) void
setPreviousLedgerHash
(Hash previousLedgerHash) void
setScpValue
(StellarValue scpValue) void
setSkipList
(Hash[] skipList) void
setTotalCoins
(Int64 totalCoins) void
setTxSetResultHash
(Hash txSetResultHash) toString()
default String
default byte[]
-
Constructor Details
-
LedgerHeader
public LedgerHeader() -
LedgerHeader
public LedgerHeader(Uint32 ledgerVersion, Hash previousLedgerHash, StellarValue scpValue, Hash txSetResultHash, Hash bucketListHash, Uint32 ledgerSeq, Int64 totalCoins, Int64 feePool, Uint32 inflationSeq, Uint64 idPool, Uint32 baseFee, Uint32 baseReserve, Uint32 maxTxSetSize, Hash[] skipList, LedgerHeader.LedgerHeaderExt ext)
-
-
Method Details
-
encode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
builder
-
toBuilder
-
getLedgerVersion
-
getPreviousLedgerHash
-
getScpValue
-
getTxSetResultHash
-
getBucketListHash
-
getLedgerSeq
-
getTotalCoins
-
getFeePool
-
getInflationSeq
-
getIdPool
-
getBaseFee
-
getBaseReserve
-
getMaxTxSetSize
-
getSkipList
-
getExt
-
setLedgerVersion
-
setPreviousLedgerHash
-
setScpValue
-
setTxSetResultHash
-
setBucketListHash
-
setLedgerSeq
-
setTotalCoins
-
setFeePool
-
setInflationSeq
-
setIdPool
-
setBaseFee
-
setBaseReserve
-
setMaxTxSetSize
-
setSkipList
-
setExt
-
equals
-
hashCode
public int hashCode() -
toString
-
toXdrBase64
- Throws:
IOException
-
toXdrByteArray
- Throws:
IOException
-