Package io.nem.symbol.catapult.builders
Class NormalBlockHeaderBuilder
- java.lang.Object
-
- io.nem.symbol.catapult.builders.BlockHeaderBuilder
-
- io.nem.symbol.catapult.builders.NormalBlockHeaderBuilder
-
- All Implemented Interfaces:
Serializer
public class NormalBlockHeaderBuilder extends BlockHeaderBuilder implements Serializer
Binary layout for a normal block header
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNormalBlockHeaderBuilder(SignatureDto signature, KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, HeightDto height, TimestampDto timestamp, DifficultyDto difficulty, VrfProofBuilder generationHashProof, Hash256Dto previousBlockHash, Hash256Dto transactionsHash, Hash256Dto receiptsHash, Hash256Dto stateHash, AddressDto beneficiaryAddress, BlockFeeMultiplierDto feeMultiplier)Constructor.protectedNormalBlockHeaderBuilder(java.io.DataInputStream stream)Constructor - Creates an object from stream.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NormalBlockHeaderBuildercreate(SignatureDto signature, KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, HeightDto height, TimestampDto timestamp, DifficultyDto difficulty, VrfProofBuilder generationHashProof, Hash256Dto previousBlockHash, Hash256Dto transactionsHash, Hash256Dto receiptsHash, Hash256Dto stateHash, AddressDto beneficiaryAddress, BlockFeeMultiplierDto feeMultiplier)Creates an instance of NormalBlockHeaderBuilder.intgetSize()Gets the size of the object.static NormalBlockHeaderBuilderloadFromBinary(java.io.DataInputStream stream)Creates an instance of NormalBlockHeaderBuilder from a stream.byte[]serialize()Serializes an object to bytes.-
Methods inherited from class io.nem.symbol.catapult.builders.BlockHeaderBuilder
getBeneficiaryAddress, getDifficulty, getFeeMultiplier, getGenerationHashProof, getHeight, getNetwork, getPreviousBlockHash, getReceiptsHash, getSignature, getSignerPublicKey, getStateHash, getStreamSize, getTimestamp, getTransactionsHash, getType, getVersion
-
-
-
-
Constructor Detail
-
NormalBlockHeaderBuilder
protected NormalBlockHeaderBuilder(java.io.DataInputStream stream)
Constructor - Creates an object from stream.- Parameters:
stream- Byte stream to use to serialize the object.
-
NormalBlockHeaderBuilder
protected NormalBlockHeaderBuilder(SignatureDto signature, KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, HeightDto height, TimestampDto timestamp, DifficultyDto difficulty, VrfProofBuilder generationHashProof, Hash256Dto previousBlockHash, Hash256Dto transactionsHash, Hash256Dto receiptsHash, Hash256Dto stateHash, AddressDto beneficiaryAddress, BlockFeeMultiplierDto feeMultiplier)
Constructor.- Parameters:
signature- Entity signature.signerPublicKey- Entity signer's public key.version- Entity version.network- Entity network.type- Entity type.height- Block height.timestamp- Number of milliseconds elapsed since creation of nemesis block.difficulty- Block difficulty.generationHashProof- Generation hash proof.previousBlockHash- Previous block hash.transactionsHash- Hash of the transactions in this block.receiptsHash- Hash of the receipts generated by this block.stateHash- Hash of the global chain state at this block.beneficiaryAddress- Beneficiary address designated by harvester.feeMultiplier- Fee multiplier applied to block transactions.
-
-
Method Detail
-
loadFromBinary
public static NormalBlockHeaderBuilder loadFromBinary(java.io.DataInputStream stream)
Creates an instance of NormalBlockHeaderBuilder from a stream.- Parameters:
stream- Byte stream to use to serialize the object.- Returns:
- Instance of NormalBlockHeaderBuilder.
-
create
public static NormalBlockHeaderBuilder create(SignatureDto signature, KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, HeightDto height, TimestampDto timestamp, DifficultyDto difficulty, VrfProofBuilder generationHashProof, Hash256Dto previousBlockHash, Hash256Dto transactionsHash, Hash256Dto receiptsHash, Hash256Dto stateHash, AddressDto beneficiaryAddress, BlockFeeMultiplierDto feeMultiplier)
Creates an instance of NormalBlockHeaderBuilder.- Parameters:
signature- Entity signature.signerPublicKey- Entity signer's public key.version- Entity version.network- Entity network.type- Entity type.height- Block height.timestamp- Number of milliseconds elapsed since creation of nemesis block.difficulty- Block difficulty.generationHashProof- Generation hash proof.previousBlockHash- Previous block hash.transactionsHash- Hash of the transactions in this block.receiptsHash- Hash of the receipts generated by this block.stateHash- Hash of the global chain state at this block.beneficiaryAddress- Beneficiary address designated by harvester.feeMultiplier- Fee multiplier applied to block transactions.- Returns:
- Instance of NormalBlockHeaderBuilder.
-
getSize
public int getSize()
Gets the size of the object.- Specified by:
getSizein interfaceSerializer- Overrides:
getSizein classBlockHeaderBuilder- Returns:
- Size in bytes.
-
serialize
public byte[] serialize()
Serializes an object to bytes.- Specified by:
serializein interfaceSerializer- Overrides:
serializein classBlockHeaderBuilder- Returns:
- Serialized bytes.
-
-