Uses of Record Class
com.privatechain.core.model.BlockHeader
Packages that use BlockHeader
Package
Description
Immutable domain objects — the fundamental data model of the private-blockchain library.
-
Uses of BlockHeader in com.privatechain.core.model
Methods in com.privatechain.core.model that return BlockHeaderModifier and TypeMethodDescriptionBlockHeader.Builder.build()Builds and returns theBlockHeader.static BlockHeaderBlockHeader.genesis()Creates a genesis-block header with a zero nonce and the empty Merkle root.Block.getHeader()Returns the block header (version, nonce, Merkle root, timestamp).static BlockHeaderCreates aBlockHeaderwith the current UTC timestamp and version 1.Methods in com.privatechain.core.model with parameters of type BlockHeaderModifier and TypeMethodDescriptionstatic StringBlock.computeHash(int index, String previousHash, BlockHeader header) Backwards-compatible overload that omitsminerAddress.static StringBlock.computeHash(int index, String previousHash, BlockHeader header, String minerAddress) Computes the SHA-256 hash of a block from its constituent fields.Block.Builder.header(BlockHeader header) Sets the block header.Constructors in com.privatechain.core.model with parameters of type BlockHeaderModifierConstructorDescriptionBlock(int index, BlockHeader header, String previousHash, String hash, List<Transaction> transactions, String minerAddress) Constructs a fully formed, immutable block.