Package com.exonum.client.response
Class Block.BlockBuilder
java.lang.Object
com.exonum.client.response.Block.BlockBuilder
- Enclosing class:
- Block
public static class Block.BlockBuilder
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description Blockbuild()Block.BlockBuildercommitTime(java.time.ZonedDateTime commitTime)Time when the block was committed to the blockchain.Block.BlockBuilderheight(long height)The height of this block which is a distance between the last block and the "genesis" block.Block.BlockBuildernumTransactions(int numTransactions)Number of transactions in this block.Block.BlockBuilderpreviousBlockHash(@NonNull com.exonum.binding.common.hash.HashCode previousBlockHash)Hash link to the previous block in the blockchain.Block.BlockBuilderproposerId(int proposerId)Identifier of the leader node which has proposed the block.Block.BlockBuilderstateHash(@NonNull com.exonum.binding.common.hash.HashCode stateHash)Hash of the blockchain state after applying transactions in the block.java.lang.StringtoString()Block.BlockBuildertxRootHash(@NonNull com.exonum.binding.common.hash.HashCode txRootHash)Root hash of the Merkle tree of transactions in this block.
-
Method Details
-
proposerId
Identifier of the leader node which has proposed the block.- Returns:
this.
-
height
The height of this block which is a distance between the last block and the "genesis" block. Genesis block has 0 height. Therefore, the blockchain height is equal to the number of blocks plus one.The height also identifies each block in the blockchain.
- Returns:
this.
-
numTransactions
Number of transactions in this block.- Returns:
this.
-
previousBlockHash
public Block.BlockBuilder previousBlockHash(@NonNull @NonNull com.exonum.binding.common.hash.HashCode previousBlockHash)Hash link to the previous block in the blockchain.- Returns:
this.
-
txRootHash
public Block.BlockBuilder txRootHash(@NonNull @NonNull com.exonum.binding.common.hash.HashCode txRootHash)Root hash of the Merkle tree of transactions in this block.- Returns:
this.
-
stateHash
public Block.BlockBuilder stateHash(@NonNull @NonNull com.exonum.binding.common.hash.HashCode stateHash)Hash of the blockchain state after applying transactions in the block.- Returns:
this.
-
commitTime
Time when the block was committed to the blockchain.- Returns:
this.
-
build
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-