solana_epoch_info/
lib.rs

1#![no_std]
2
3//! Information about the current epoch.
4//!
5//! As returned by the [`getEpochInfo`] RPC method.
6//!
7//! [`getEpochInfo`]: https://solana.com/docs/rpc/http/getepochinfo
8#![cfg_attr(docsrs, feature(doc_cfg))]
9
10#[cfg_attr(
11    feature = "serde",
12    derive(serde_derive::Deserialize, serde_derive::Serialize),
13    serde(rename_all = "camelCase")
14)]
15#[derive(Clone, Debug, Eq, PartialEq)]
16pub struct EpochInfo {
17    /// The current epoch
18    pub epoch: u64,
19
20    /// The current slot, relative to the start of the current epoch
21    pub slot_index: u64,
22
23    /// The number of slots in this epoch
24    pub slots_in_epoch: u64,
25
26    /// The absolute current slot
27    pub absolute_slot: u64,
28
29    /// The current block height
30    pub block_height: u64,
31
32    /// Total number of transactions processed without error since genesis
33    pub transaction_count: Option<u64>,
34}