public class LedgerHeader extends java.lang.Object implements XdrElement
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;
};
| Modifier and Type | Class and Description |
|---|---|
static class |
LedgerHeader.LedgerHeaderBuilder |
static class |
LedgerHeader.LedgerHeaderExt
LedgerHeaderExt's original definition in the XDR file is:
|
| Constructor and Description |
|---|
LedgerHeader() |
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) |
toXdrBase64, toXdrByteArraypublic 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)
public void encode(XdrDataOutputStream stream) throws java.io.IOException
encode in interface XdrElementjava.io.IOExceptionpublic static LedgerHeader decode(XdrDataInputStream stream) throws java.io.IOException
java.io.IOExceptionpublic static LedgerHeader fromXdrBase64(java.lang.String xdr) throws java.io.IOException
java.io.IOExceptionpublic static LedgerHeader fromXdrByteArray(byte[] xdr) throws java.io.IOException
java.io.IOExceptionpublic static LedgerHeader.LedgerHeaderBuilder builder()
public LedgerHeader.LedgerHeaderBuilder toBuilder()
public Uint32 getLedgerVersion()
public Hash getPreviousLedgerHash()
public StellarValue getScpValue()
public Hash getTxSetResultHash()
public Hash getBucketListHash()
public Uint32 getLedgerSeq()
public Int64 getTotalCoins()
public Int64 getFeePool()
public Uint32 getInflationSeq()
public Uint64 getIdPool()
public Uint32 getBaseFee()
public Uint32 getBaseReserve()
public Uint32 getMaxTxSetSize()
public Hash[] getSkipList()
public LedgerHeader.LedgerHeaderExt getExt()
public void setLedgerVersion(Uint32 ledgerVersion)
public void setPreviousLedgerHash(Hash previousLedgerHash)
public void setScpValue(StellarValue scpValue)
public void setTxSetResultHash(Hash txSetResultHash)
public void setBucketListHash(Hash bucketListHash)
public void setLedgerSeq(Uint32 ledgerSeq)
public void setTotalCoins(Int64 totalCoins)
public void setFeePool(Int64 feePool)
public void setInflationSeq(Uint32 inflationSeq)
public void setIdPool(Uint64 idPool)
public void setBaseFee(Uint32 baseFee)
public void setBaseReserve(Uint32 baseReserve)
public void setMaxTxSetSize(Uint32 maxTxSetSize)
public void setSkipList(Hash[] skipList)
public void setExt(LedgerHeader.LedgerHeaderExt ext)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object