hypersync_net_types/
response.rs

1use hypersync_format::Hash;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Copy, Deserialize, Serialize, Debug)]
5pub struct ArchiveHeight {
6    pub height: Option<u64>,
7}
8
9#[derive(Clone, Copy, Deserialize, Serialize, Debug)]
10pub struct ChainId {
11    pub chain_id: u64,
12}
13
14/// Guard for detecting rollbacks
15#[derive(Debug, Clone, Serialize)]
16pub struct RollbackGuard {
17    /// Block number of last block scanned in memory
18    pub block_number: u64,
19    /// Block timestamp of last block scanned in memory
20    pub timestamp: i64,
21    /// Block hash of last block scanned in memory
22    pub hash: Hash,
23    /// Block number of first block scanned in memory
24    pub first_block_number: u64,
25    /// Parent hash of first block scanned in memory
26    pub first_parent_hash: Hash,
27}