public class BlockHeader extends Object implements ByteTransformable
| Modifier and Type | Field and Description |
|---|---|
protected List<BlockHeaderExtensions> |
extensions |
protected BlockId |
previous |
protected AccountName |
supernode |
protected TimePointSec |
timestamp |
protected Checksum |
transactionMerkleRoot |
| Constructor and Description |
|---|
BlockHeader() |
| Modifier and Type | Method and Description |
|---|---|
List<BlockHeaderExtensions> |
getExtensions()
Get the list of configured extensions.
|
BlockId |
getPrevious() |
AccountName |
getSupernode() |
TimePointSec |
getTimestamp() |
Checksum |
getTransactionMerkleRoot() |
void |
setExtensions(List<BlockHeaderExtensions> extensions)
Extensions are currently not supported and will be ignored.
|
void |
setPrevious(BlockId previous) |
void |
setSupernode(AccountName supernode) |
void |
setTimestamp(TimePointSec timestamp) |
void |
setTransactionMerkleRoot(Checksum transactionMerkleRoot) |
byte[] |
toByteArray()
Covert the operation into a byte array.
|
String |
toString() |
protected BlockId previous
protected TimePointSec timestamp
protected AccountName supernode
protected Checksum transactionMerkleRoot
protected List<BlockHeaderExtensions> extensions
public BlockId getPrevious()
public void setPrevious(BlockId previous)
previous - The block id of the previous block to set.public AccountName getSupernode()
public void setSupernode(AccountName supernode)
supernode - the supernode to setpublic Checksum getTransactionMerkleRoot()
public void setTransactionMerkleRoot(Checksum transactionMerkleRoot)
transactionMerkleRoot - the transactionMerkleRoot to setpublic List<BlockHeaderExtensions> getExtensions()
public void setExtensions(List<BlockHeaderExtensions> extensions)
extensions - Define a list of extensions.public TimePointSec getTimestamp()
public void setTimestamp(TimePointSec timestamp)
timestamp - the timestamp to setpublic byte[] toByteArray()
throws BeowulfInvalidTransactionException
ByteTransformabletoByteArray in interface ByteTransformableBeowulfInvalidTransactionException - If there was a problem while transforming the transaction
into a byte array.Copyright © 2019. All rights reserved.