Class BlocksResponse

java.lang.Object
com.exonum.client.response.BlocksResponse

public final class BlocksResponse
extends Object
  • Constructor Details

  • Method Details

    • getBlocks

      public List<Block> 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 to heightMax + 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 to last_committed_block.height + 1. If some blocks in the range do not match the search criteria then: blocksRangeEnd - blocksRangeStart != blocks.size.

    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object