Struct near_workspaces::rpc::query::QueryChunk
source · pub struct QueryChunk<'a> { /* private fields */ }Expand description
Query object used to query for chunk related details at a specific ChunkReference which
consists of either a chunk CryptoHash, or a BlockShardId (which consists of ShardId
and either block CryptoHash or BlockHeight).
The default behavior where a ChunkReference is not supplied will use a BlockShardId
referencing the lastest block CryptoHash with ShardId of 0.
Implementations§
source§impl<'a> QueryChunk<'a>
impl<'a> QueryChunk<'a>
sourcepub fn block_hash_and_shard(self, hash: CryptoHash, shard_id: ShardId) -> Self
pub fn block_hash_and_shard(self, hash: CryptoHash, shard_id: ShardId) -> Self
Specify at which block hash and shard id to query the chunk from. Note that only archival networks will have the full history while networks like mainnet or testnet will only have the history from 5 or less epochs ago.
sourcepub fn block_height_and_shard(
self,
height: BlockHeight,
shard_id: ShardId
) -> Self
pub fn block_height_and_shard(
self,
height: BlockHeight,
shard_id: ShardId
) -> Self
Specify at which block height and shard id to query the chunk from. Note that only archival networks will have the full history while networks like mainnet or testnet will only have the history from 5 or less epochs ago.
sourcepub fn chunk_hash(self, hash: CryptoHash) -> Self
pub fn chunk_hash(self, hash: CryptoHash) -> Self
Specify at which chunk hash to query the chunk from.