public class BlockHeader extends MychainObject
| 构造器和说明 |
|---|
BlockHeader() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
calcHash(BlockHeader header) |
static String |
calcHash(BlockHeader header,
HashTypeEnum hashTypeEnum) |
void |
fromJson(com.alibaba.fastjson.JSONObject jsonObject)
Decode message from json object.
|
void |
fromRlp(RlpList list)
Decode message from rlp bytes.
|
BigInteger |
getGasUsed() |
Hash |
getHash() |
byte[] |
getLogBloom() |
BigInteger |
getNumber() |
Hash |
getParentHash() |
Hash |
getReceiptRoot() |
Hash |
getStateRoot() |
long |
getTimestamp() |
Hash |
getTransactionRoot() |
Long |
getVersion() |
void |
setGasUsed(BigInteger gasUsed) |
void |
setHash(Hash hash) |
void |
setLogBloom(byte[] logBloom) |
void |
setNumber(BigInteger number) |
void |
setParentHash(Hash parentHash) |
void |
setReceiptRoot(Hash receiptRoot) |
void |
setStateRoot(Hash stateRoot) |
void |
setTimestamp(long timestamp) |
void |
setTransactionRoot(Hash transactionRoot) |
void |
setVersion(Long version) |
void |
toJson(com.alibaba.fastjson.JSONObject jsonObject)
Encode message to json object.
|
byte[] |
toRlp()
Encode message to rlp bytes.
|
toStringpublic static String calcHash(BlockHeader header)
public static String calcHash(BlockHeader header, HashTypeEnum hashTypeEnum)
public Hash getHash()
public void setHash(Hash hash)
public Hash getParentHash()
public void setParentHash(Hash parentHash)
public Hash getTransactionRoot()
public void setTransactionRoot(Hash transactionRoot)
public Hash getReceiptRoot()
public void setReceiptRoot(Hash receiptRoot)
public Hash getStateRoot()
public void setStateRoot(Hash stateRoot)
public Long getVersion()
public void setVersion(Long version)
public BigInteger getNumber()
public void setNumber(BigInteger number)
public BigInteger getGasUsed()
public void setGasUsed(BigInteger gasUsed)
public long getTimestamp()
public void setTimestamp(long timestamp)
public byte[] getLogBloom()
public void setLogBloom(byte[] logBloom)
public byte[] toRlp()
toRlp 在类中 MychainObjectpublic void fromRlp(RlpList list)
fromRlp 在类中 MychainObjectlist - the rlp bytespublic void toJson(com.alibaba.fastjson.JSONObject jsonObject)
toJson 在类中 MychainObjectjsonObject - the json objectpublic void fromJson(com.alibaba.fastjson.JSONObject jsonObject)
fromJson 在类中 MychainObjectjsonObject - the json objectCopyright © 2022. All rights reserved.