java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<BlockInfo,BlockInfo.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<BlockInfo,BlockInfo.Builder>
com.hedera.hashgraph.sdk.proto.BlockInfo.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,BlockInfoOrBuilder,Cloneable
- Enclosing class:
BlockInfo
public static final class BlockInfo.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<BlockInfo,BlockInfo.Builder>
implements BlockInfoOrBuilder
* Information for a transaction block. This includes: - last block number. - consensus times for: - previous block start. - current block start. - last handled transaction. - hash data for a rolling window of 256 blocks. - whether migration records were produced.Protobuf type
proto.BlockInfo-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionaddAllWrappedIntermediatePreviousBlockRootHashes(Iterable<? extends com.google.protobuf.ByteString> values) * The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure.addWrappedIntermediatePreviousBlockRootHashes(com.google.protobuf.ByteString value) * The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure.* A list of the last 256 block hashes.<br/> This is the SHA384 48 byte hashes of the previous 256 blocks, collected in a single byte array.* A consensus timestamp.* A consensus timestamp.* A consensus timestamp.* A block number.* The time stamp at which the last interval process was done.* The consensus time of the last transaction that was handled by the node.* A flag indicating that migration records have been published.* The root hash of the previous wrapped record block.* The number of leaves in the intermediate wrapped record block roots subtree.* The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure.com.google.protobuf.ByteString* A list of the last 256 block hashes.<br/> This is the SHA384 48 byte hashes of the previous 256 blocks, collected in a single byte array.* A consensus timestamp.* A consensus timestamp.* A consensus timestamp.long* A block number.* The time stamp at which the last interval process was done.* The consensus time of the last transaction that was handled by the node.boolean* A flag indicating that migration records have been published.com.google.protobuf.ByteString* The root hash of the previous wrapped record block.long* The number of leaves in the intermediate wrapped record block roots subtree.com.google.protobuf.ByteString* The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure.int* The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure.List<com.google.protobuf.ByteString> * The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure.boolean* A consensus timestamp.boolean* A consensus timestamp.boolean* A consensus timestamp.boolean* The time stamp at which the last interval process was done.boolean* The consensus time of the last transaction that was handled by the node.* A consensus timestamp.* A consensus timestamp.* A consensus timestamp.* The time stamp at which the last interval process was done.mergeLastUsedConsTime(Timestamp value) * The consensus time of the last transaction that was handled by the node.setBlockHashes(com.google.protobuf.ByteString value) * A list of the last 256 block hashes.<br/> This is the SHA384 48 byte hashes of the previous 256 blocks, collected in a single byte array.* A consensus timestamp.setConsTimeOfLastHandledTxn(Timestamp.Builder builderForValue) * A consensus timestamp.* A consensus timestamp.setFirstConsTimeOfCurrentBlock(Timestamp.Builder builderForValue) * A consensus timestamp.* A consensus timestamp.setFirstConsTimeOfLastBlock(Timestamp.Builder builderForValue) * A consensus timestamp.setLastBlockNumber(long value) * A block number.* The time stamp at which the last interval process was done.setLastIntervalProcessTime(Timestamp.Builder builderForValue) * The time stamp at which the last interval process was done.setLastUsedConsTime(Timestamp value) * The consensus time of the last transaction that was handled by the node.setLastUsedConsTime(Timestamp.Builder builderForValue) * The consensus time of the last transaction that was handled by the node.setMigrationRecordsStreamed(boolean value) * A flag indicating that migration records have been published.setPreviousWrappedRecordBlockRootHash(com.google.protobuf.ByteString value) * The root hash of the previous wrapped record block.setWrappedIntermediateBlockRootsLeafCount(long value) * The number of leaves in the intermediate wrapped record block roots subtree.setWrappedIntermediatePreviousBlockRootHashes(int index, com.google.protobuf.ByteString value) * The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getLastBlockNumber
public long getLastBlockNumber()* A block number. <p> The block number of the last completed immutable block.
int64 last_block_number = 1;- Specified by:
getLastBlockNumberin interfaceBlockInfoOrBuilder- Returns:
- The lastBlockNumber.
-
setLastBlockNumber
* A block number. <p> The block number of the last completed immutable block.
int64 last_block_number = 1;- Parameters:
value- The lastBlockNumber to set.- Returns:
- This builder for chaining.
-
clearLastBlockNumber
* A block number. <p> The block number of the last completed immutable block.
int64 last_block_number = 1;- Returns:
- This builder for chaining.
-
hasFirstConsTimeOfLastBlock
public boolean hasFirstConsTimeOfLastBlock()* A consensus timestamp. <p> The consensus time of the first transaction for the last completed immutable block.
.proto.Timestamp first_cons_time_of_last_block = 2;- Specified by:
hasFirstConsTimeOfLastBlockin interfaceBlockInfoOrBuilder- Returns:
- Whether the firstConsTimeOfLastBlock field is set.
-
getFirstConsTimeOfLastBlock
* A consensus timestamp. <p> The consensus time of the first transaction for the last completed immutable block.
.proto.Timestamp first_cons_time_of_last_block = 2;- Specified by:
getFirstConsTimeOfLastBlockin interfaceBlockInfoOrBuilder- Returns:
- The firstConsTimeOfLastBlock.
-
setFirstConsTimeOfLastBlock
* A consensus timestamp. <p> The consensus time of the first transaction for the last completed immutable block.
.proto.Timestamp first_cons_time_of_last_block = 2; -
setFirstConsTimeOfLastBlock
* A consensus timestamp. <p> The consensus time of the first transaction for the last completed immutable block.
.proto.Timestamp first_cons_time_of_last_block = 2; -
mergeFirstConsTimeOfLastBlock
* A consensus timestamp. <p> The consensus time of the first transaction for the last completed immutable block.
.proto.Timestamp first_cons_time_of_last_block = 2; -
clearFirstConsTimeOfLastBlock
* A consensus timestamp. <p> The consensus time of the first transaction for the last completed immutable block.
.proto.Timestamp first_cons_time_of_last_block = 2; -
getBlockHashes
public com.google.protobuf.ByteString getBlockHashes()* A list of the last 256 block hashes.<br/> This is the SHA384 48 byte hashes of the previous 256 blocks, collected in a single byte array. <p> The first 48 bytes SHALL be the oldest block in the list.<br/> The last 48 bytes SHALL be the newest block, which is the last fully completed immutable block.<br/> This SHALL contain less than 256 block hashes if there are less than 256 preceding blocks; for instance, shortly after network genesis the network will not have processed 256 blocks yet. <p> This MAY change significantly for Block Stream (HIP TBD).
bytes block_hashes = 3;- Specified by:
getBlockHashesin interfaceBlockInfoOrBuilder- Returns:
- The blockHashes.
-
setBlockHashes
* A list of the last 256 block hashes.<br/> This is the SHA384 48 byte hashes of the previous 256 blocks, collected in a single byte array. <p> The first 48 bytes SHALL be the oldest block in the list.<br/> The last 48 bytes SHALL be the newest block, which is the last fully completed immutable block.<br/> This SHALL contain less than 256 block hashes if there are less than 256 preceding blocks; for instance, shortly after network genesis the network will not have processed 256 blocks yet. <p> This MAY change significantly for Block Stream (HIP TBD).
bytes block_hashes = 3;- Parameters:
value- The blockHashes to set.- Returns:
- This builder for chaining.
-
clearBlockHashes
* A list of the last 256 block hashes.<br/> This is the SHA384 48 byte hashes of the previous 256 blocks, collected in a single byte array. <p> The first 48 bytes SHALL be the oldest block in the list.<br/> The last 48 bytes SHALL be the newest block, which is the last fully completed immutable block.<br/> This SHALL contain less than 256 block hashes if there are less than 256 preceding blocks; for instance, shortly after network genesis the network will not have processed 256 blocks yet. <p> This MAY change significantly for Block Stream (HIP TBD).
bytes block_hashes = 3;- Returns:
- This builder for chaining.
-
hasConsTimeOfLastHandledTxn
public boolean hasConsTimeOfLastHandledTxn()* A consensus timestamp. <p> The consensus time of the last transaction that was handled by the node within the current block. Only top-level transactions can trigger stake period side effects, so we track them separately from the last-used time of <i>all</i> transactions, which include children.<br/>
.proto.Timestamp cons_time_of_last_handled_txn = 4;- Specified by:
hasConsTimeOfLastHandledTxnin interfaceBlockInfoOrBuilder- Returns:
- Whether the consTimeOfLastHandledTxn field is set.
-
getConsTimeOfLastHandledTxn
* A consensus timestamp. <p> The consensus time of the last transaction that was handled by the node within the current block. Only top-level transactions can trigger stake period side effects, so we track them separately from the last-used time of <i>all</i> transactions, which include children.<br/>
.proto.Timestamp cons_time_of_last_handled_txn = 4;- Specified by:
getConsTimeOfLastHandledTxnin interfaceBlockInfoOrBuilder- Returns:
- The consTimeOfLastHandledTxn.
-
setConsTimeOfLastHandledTxn
* A consensus timestamp. <p> The consensus time of the last transaction that was handled by the node within the current block. Only top-level transactions can trigger stake period side effects, so we track them separately from the last-used time of <i>all</i> transactions, which include children.<br/>
.proto.Timestamp cons_time_of_last_handled_txn = 4; -
setConsTimeOfLastHandledTxn
* A consensus timestamp. <p> The consensus time of the last transaction that was handled by the node within the current block. Only top-level transactions can trigger stake period side effects, so we track them separately from the last-used time of <i>all</i> transactions, which include children.<br/>
.proto.Timestamp cons_time_of_last_handled_txn = 4; -
mergeConsTimeOfLastHandledTxn
* A consensus timestamp. <p> The consensus time of the last transaction that was handled by the node within the current block. Only top-level transactions can trigger stake period side effects, so we track them separately from the last-used time of <i>all</i> transactions, which include children.<br/>
.proto.Timestamp cons_time_of_last_handled_txn = 4; -
clearConsTimeOfLastHandledTxn
* A consensus timestamp. <p> The consensus time of the last transaction that was handled by the node within the current block. Only top-level transactions can trigger stake period side effects, so we track them separately from the last-used time of <i>all</i> transactions, which include children.<br/>
.proto.Timestamp cons_time_of_last_handled_txn = 4; -
getMigrationRecordsStreamed
public boolean getMigrationRecordsStreamed()* A flag indicating that migration records have been published. <p> This property SHALL be `false` immediately following a node upgrade<br/> This SHALL be set 'true' as migration records, if any, are published. Migration records are typically published "during" the first transaction handled by the node following startup.
bool migration_records_streamed = 5;- Specified by:
getMigrationRecordsStreamedin interfaceBlockInfoOrBuilder- Returns:
- The migrationRecordsStreamed.
-
setMigrationRecordsStreamed
* A flag indicating that migration records have been published. <p> This property SHALL be `false` immediately following a node upgrade<br/> This SHALL be set 'true' as migration records, if any, are published. Migration records are typically published "during" the first transaction handled by the node following startup.
bool migration_records_streamed = 5;- Parameters:
value- The migrationRecordsStreamed to set.- Returns:
- This builder for chaining.
-
clearMigrationRecordsStreamed
* A flag indicating that migration records have been published. <p> This property SHALL be `false` immediately following a node upgrade<br/> This SHALL be set 'true' as migration records, if any, are published. Migration records are typically published "during" the first transaction handled by the node following startup.
bool migration_records_streamed = 5;- Returns:
- This builder for chaining.
-
hasFirstConsTimeOfCurrentBlock
public boolean hasFirstConsTimeOfCurrentBlock()* A consensus timestamp. <p> The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect when the current block is finished.
.proto.Timestamp first_cons_time_of_current_block = 6;- Specified by:
hasFirstConsTimeOfCurrentBlockin interfaceBlockInfoOrBuilder- Returns:
- Whether the firstConsTimeOfCurrentBlock field is set.
-
getFirstConsTimeOfCurrentBlock
* A consensus timestamp. <p> The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect when the current block is finished.
.proto.Timestamp first_cons_time_of_current_block = 6;- Specified by:
getFirstConsTimeOfCurrentBlockin interfaceBlockInfoOrBuilder- Returns:
- The firstConsTimeOfCurrentBlock.
-
setFirstConsTimeOfCurrentBlock
* A consensus timestamp. <p> The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect when the current block is finished.
.proto.Timestamp first_cons_time_of_current_block = 6; -
setFirstConsTimeOfCurrentBlock
* A consensus timestamp. <p> The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect when the current block is finished.
.proto.Timestamp first_cons_time_of_current_block = 6; -
mergeFirstConsTimeOfCurrentBlock
* A consensus timestamp. <p> The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect when the current block is finished.
.proto.Timestamp first_cons_time_of_current_block = 6; -
clearFirstConsTimeOfCurrentBlock
* A consensus timestamp. <p> The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect when the current block is finished.
.proto.Timestamp first_cons_time_of_current_block = 6; -
hasLastUsedConsTime
public boolean hasLastUsedConsTime()* The consensus time of the last transaction that was handled by the node. <p> This property is how we 'advance the consensus clock'. The node MUST continually set this property to the consensus timestamp for the most recent transaction completed by the node.
.proto.Timestamp last_used_cons_time = 7;- Specified by:
hasLastUsedConsTimein interfaceBlockInfoOrBuilder- Returns:
- Whether the lastUsedConsTime field is set.
-
getLastUsedConsTime
* The consensus time of the last transaction that was handled by the node. <p> This property is how we 'advance the consensus clock'. The node MUST continually set this property to the consensus timestamp for the most recent transaction completed by the node.
.proto.Timestamp last_used_cons_time = 7;- Specified by:
getLastUsedConsTimein interfaceBlockInfoOrBuilder- Returns:
- The lastUsedConsTime.
-
setLastUsedConsTime
* The consensus time of the last transaction that was handled by the node. <p> This property is how we 'advance the consensus clock'. The node MUST continually set this property to the consensus timestamp for the most recent transaction completed by the node.
.proto.Timestamp last_used_cons_time = 7; -
setLastUsedConsTime
* The consensus time of the last transaction that was handled by the node. <p> This property is how we 'advance the consensus clock'. The node MUST continually set this property to the consensus timestamp for the most recent transaction completed by the node.
.proto.Timestamp last_used_cons_time = 7; -
mergeLastUsedConsTime
* The consensus time of the last transaction that was handled by the node. <p> This property is how we 'advance the consensus clock'. The node MUST continually set this property to the consensus timestamp for the most recent transaction completed by the node.
.proto.Timestamp last_used_cons_time = 7; -
clearLastUsedConsTime
* The consensus time of the last transaction that was handled by the node. <p> This property is how we 'advance the consensus clock'. The node MUST continually set this property to the consensus timestamp for the most recent transaction completed by the node.
.proto.Timestamp last_used_cons_time = 7; -
hasLastIntervalProcessTime
public boolean hasLastIntervalProcessTime()* The time stamp at which the last interval process was done. <p> This field SHALL hold the consensus time for the last time at which an interval of time-dependent events were processed.
.proto.Timestamp last_interval_process_time = 8;- Specified by:
hasLastIntervalProcessTimein interfaceBlockInfoOrBuilder- Returns:
- Whether the lastIntervalProcessTime field is set.
-
getLastIntervalProcessTime
* The time stamp at which the last interval process was done. <p> This field SHALL hold the consensus time for the last time at which an interval of time-dependent events were processed.
.proto.Timestamp last_interval_process_time = 8;- Specified by:
getLastIntervalProcessTimein interfaceBlockInfoOrBuilder- Returns:
- The lastIntervalProcessTime.
-
setLastIntervalProcessTime
* The time stamp at which the last interval process was done. <p> This field SHALL hold the consensus time for the last time at which an interval of time-dependent events were processed.
.proto.Timestamp last_interval_process_time = 8; -
setLastIntervalProcessTime
* The time stamp at which the last interval process was done. <p> This field SHALL hold the consensus time for the last time at which an interval of time-dependent events were processed.
.proto.Timestamp last_interval_process_time = 8; -
mergeLastIntervalProcessTime
* The time stamp at which the last interval process was done. <p> This field SHALL hold the consensus time for the last time at which an interval of time-dependent events were processed.
.proto.Timestamp last_interval_process_time = 8; -
clearLastIntervalProcessTime
* The time stamp at which the last interval process was done. <p> This field SHALL hold the consensus time for the last time at which an interval of time-dependent events were processed.
.proto.Timestamp last_interval_process_time = 8; -
getPreviousWrappedRecordBlockRootHash
public com.google.protobuf.ByteString getPreviousWrappedRecordBlockRootHash()* The root hash of the previous wrapped record block.
bytes previous_wrapped_record_block_root_hash = 10;- Specified by:
getPreviousWrappedRecordBlockRootHashin interfaceBlockInfoOrBuilder- Returns:
- The previousWrappedRecordBlockRootHash.
-
setPreviousWrappedRecordBlockRootHash
public BlockInfo.Builder setPreviousWrappedRecordBlockRootHash(com.google.protobuf.ByteString value) * The root hash of the previous wrapped record block.
bytes previous_wrapped_record_block_root_hash = 10;- Parameters:
value- The previousWrappedRecordBlockRootHash to set.- Returns:
- This builder for chaining.
-
clearPreviousWrappedRecordBlockRootHash
* The root hash of the previous wrapped record block.
bytes previous_wrapped_record_block_root_hash = 10;- Returns:
- This builder for chaining.
-
getWrappedIntermediatePreviousBlockRootHashesList
* The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure. These hashes SHALL include the minimum required wrapped record block root hashes needed to construct subroot 2's final state at the end of the previous block.
repeated bytes wrapped_intermediate_previous_block_root_hashes = 11;- Specified by:
getWrappedIntermediatePreviousBlockRootHashesListin interfaceBlockInfoOrBuilder- Returns:
- A list containing the wrappedIntermediatePreviousBlockRootHashes.
-
getWrappedIntermediatePreviousBlockRootHashesCount
public int getWrappedIntermediatePreviousBlockRootHashesCount()* The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure. These hashes SHALL include the minimum required wrapped record block root hashes needed to construct subroot 2's final state at the end of the previous block.
repeated bytes wrapped_intermediate_previous_block_root_hashes = 11;- Specified by:
getWrappedIntermediatePreviousBlockRootHashesCountin interfaceBlockInfoOrBuilder- Returns:
- The count of wrappedIntermediatePreviousBlockRootHashes.
-
getWrappedIntermediatePreviousBlockRootHashes
public com.google.protobuf.ByteString getWrappedIntermediatePreviousBlockRootHashes(int index) * The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure. These hashes SHALL include the minimum required wrapped record block root hashes needed to construct subroot 2's final state at the end of the previous block.
repeated bytes wrapped_intermediate_previous_block_root_hashes = 11;- Specified by:
getWrappedIntermediatePreviousBlockRootHashesin interfaceBlockInfoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The wrappedIntermediatePreviousBlockRootHashes at the given index.
-
setWrappedIntermediatePreviousBlockRootHashes
public BlockInfo.Builder setWrappedIntermediatePreviousBlockRootHashes(int index, com.google.protobuf.ByteString value) * The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure. These hashes SHALL include the minimum required wrapped record block root hashes needed to construct subroot 2's final state at the end of the previous block.
repeated bytes wrapped_intermediate_previous_block_root_hashes = 11;- Parameters:
value- The wrappedIntermediatePreviousBlockRootHashes to set.- Returns:
- This builder for chaining.
-
addWrappedIntermediatePreviousBlockRootHashes
public BlockInfo.Builder addWrappedIntermediatePreviousBlockRootHashes(com.google.protobuf.ByteString value) * The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure. These hashes SHALL include the minimum required wrapped record block root hashes needed to construct subroot 2's final state at the end of the previous block.
repeated bytes wrapped_intermediate_previous_block_root_hashes = 11;- Parameters:
value- The wrappedIntermediatePreviousBlockRootHashes to add.- Returns:
- This builder for chaining.
-
addAllWrappedIntermediatePreviousBlockRootHashes
public BlockInfo.Builder addAllWrappedIntermediatePreviousBlockRootHashes(Iterable<? extends com.google.protobuf.ByteString> values) * The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure. These hashes SHALL include the minimum required wrapped record block root hashes needed to construct subroot 2's final state at the end of the previous block.
repeated bytes wrapped_intermediate_previous_block_root_hashes = 11;- Parameters:
values- The wrappedIntermediatePreviousBlockRootHashes to add.- Returns:
- This builder for chaining.
-
clearWrappedIntermediatePreviousBlockRootHashes
* The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure. These hashes SHALL include the minimum required wrapped record block root hashes needed to construct subroot 2's final state at the end of the previous block.
repeated bytes wrapped_intermediate_previous_block_root_hashes = 11;- Returns:
- This builder for chaining.
-
getWrappedIntermediateBlockRootsLeafCount
public long getWrappedIntermediateBlockRootsLeafCount()* The number of leaves in the intermediate wrapped record block roots subtree.
uint64 wrapped_intermediate_block_roots_leaf_count = 12;- Specified by:
getWrappedIntermediateBlockRootsLeafCountin interfaceBlockInfoOrBuilder- Returns:
- The wrappedIntermediateBlockRootsLeafCount.
-
setWrappedIntermediateBlockRootsLeafCount
* The number of leaves in the intermediate wrapped record block roots subtree.
uint64 wrapped_intermediate_block_roots_leaf_count = 12;- Parameters:
value- The wrappedIntermediateBlockRootsLeafCount to set.- Returns:
- This builder for chaining.
-
clearWrappedIntermediateBlockRootsLeafCount
* The number of leaves in the intermediate wrapped record block roots subtree.
uint64 wrapped_intermediate_block_roots_leaf_count = 12;- Returns:
- This builder for chaining.
-