Package org.stellar.sdk.xdr
Class LedgerHeader
java.lang.Object
org.stellar.sdk.xdr.LedgerHeader
- All Implemented Interfaces:
XdrElement
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
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classLedgerHeaderExt's original definition in the XDR file is: -
Constructor Summary
ConstructorsConstructorDescriptionLedgerHeader(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 LedgerHeaderdecode(XdrDataInputStream stream) voidencode(XdrDataOutputStream stream) booleanstatic LedgerHeaderfromXdrBase64(String xdr) static LedgerHeaderfromXdrByteArray(byte[] xdr) getExt()Hash[]inthashCode()voidsetBaseFee(Uint32 baseFee) voidsetBaseReserve(Uint32 baseReserve) voidsetBucketListHash(Hash bucketListHash) voidvoidsetFeePool(Int64 feePool) voidvoidsetInflationSeq(Uint32 inflationSeq) voidsetLedgerSeq(Uint32 ledgerSeq) voidsetLedgerVersion(Uint32 ledgerVersion) voidsetMaxTxSetSize(Uint32 maxTxSetSize) voidsetPreviousLedgerHash(Hash previousLedgerHash) voidsetScpValue(StellarValue scpValue) voidsetSkipList(Hash[] skipList) voidsetTotalCoins(Int64 totalCoins) voidsetTxSetResultHash(Hash txSetResultHash) toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
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
- Specified by:
encodein interfaceXdrElement- 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
-