clone_solana_epoch_info/lib.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
7#[cfg_attr(
8 feature = "serde",
9 derive(serde_derive::Deserialize, serde_derive::Serialize),
10 serde(rename_all = "camelCase")
11)]
12#[derive(Clone, Debug, Eq, PartialEq)]
13pub struct EpochInfo {
14 /// The current epoch
15 pub epoch: u64,
16
17 /// The current slot, relative to the start of the current epoch
18 pub slot_index: u64,
19
20 /// The number of slots in this epoch
21 pub slots_in_epoch: u64,
22
23 /// The absolute current slot
24 pub absolute_slot: u64,
25
26 /// The current block height
27 pub block_height: u64,
28
29 /// Total number of transactions processed without error since genesis
30 pub transaction_count: Option<u64>,
31}