Package com.exonum.client.response
Class BlocksResponse
java.lang.Object
com.exonum.client.response.BlocksResponse
public final class BlocksResponse extends Object
-
Constructor Summary
Constructors Constructor Description BlocksResponse(List<Block> blocks, long blocksRangeStart, long blocksRangeEnd)
-
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
List<Block>
getBlocks()
Blockchain blocks in descending order (not necessarily continuous) by height.long
getBlocksRangeEnd()
The largest height of the returned blocks that match the search criteria, plus one.long
getBlocksRangeStart()
The smallest height of the returned blocks that match the search criteria.int
hashCode()
String
toString()
-
Constructor Details
-
Method Details
-
getBlocks
Blockchain blocks in descending order (not necessarily continuous) by height. It is allowed to be empty if no blocks found. -
getBlocksRangeStart
public long getBlocksRangeStart()The smallest height of the returned blocks that match the search criteria. -
getBlocksRangeEnd
public long getBlocksRangeEnd()The largest height of the returned blocks that match the search criteria, plus one.WARNING: do not rely on the value, because it's unpredictable in some queries. It'll be fixed in future releases. Read below if would still like to use it.
The value is always equal to
blocks[0].height + 1
for responses with blocks. For responses without blocks the value is set mostly randomly depending on request parameters and blockchain state: The value is equal toheightMax + 1
if heightMax request parameter is passed. If the heightMax request parameter is greater then last committed block height at the moment then blocksRangeEnd value will be equal tolast_committed_block.height + 1
. If some blocks in the range do not match the search criteria then:blocksRangeEnd - blocksRangeStart != blocks.size
. -
equals
-
hashCode
public int hashCode() -
toString
-