solana_sdk/
epoch_info.rs

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