#[non_exhaustive]pub struct BlocksQuery {
pub count: usize,
pub latest: Option<Height>,
pub earliest: Option<Height>,
pub skip_empty_blocks: bool,
pub add_blocks_time: bool,
pub add_precommits: bool,
}Expand description
Blocks in range parameters.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.count: usizeThe number of blocks to return. Should not be greater than MAX_BLOCKS_PER_REQUEST.
latest: Option<Height>The maximum height of the returned blocks.
The blocks are returned in reverse order,
starting from the latest and at least up to the latest - count + 1.
The default value is the height of the latest block in the blockchain.
earliest: Option<Height>The minimum height of the returned blocks. The default value is Height(0) (the genesis
block).
Note that earliest has the least priority compared to latest and count;
it can only truncate the list of otherwise returned blocks if some of them have a lesser
height.
skip_empty_blocks: boolIf true, then only non-empty blocks are returned. The default value is false.
add_blocks_time: boolIf true, then the time field in each returned block will contain the median time from the
block precommits.
add_precommits: boolIf true, then the precommits field in each returned block will contain precommits for the
block stored by the node.
Trait Implementations§
Source§impl Clone for BlocksQuery
impl Clone for BlocksQuery
Source§fn clone(&self) -> BlocksQuery
fn clone(&self) -> BlocksQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more