Type Alias PersistedState

Source
pub type PersistedState = PersistedDagState;
Expand description

General persisted state wrapper

Aliased Type§

pub struct PersistedState {
    pub version: u32,
    pub node_id: Vec<u8>,
    pub protocol_state: ProtocolState,
    pub sessions: HashMap<Uuid, SessionInfo>,
    pub peers: Vec<(PeerId, PeerInfo)>,
    pub dag_state: DagState,
    pub metrics: StateMachineMetrics,
    pub last_saved: u64,
}

Fields§

§version: u32

Version of the persisted state format

§node_id: Vec<u8>

Node identifier

§protocol_state: ProtocolState

Current protocol state

§sessions: HashMap<Uuid, SessionInfo>

Active sessions

§peers: Vec<(PeerId, PeerInfo)>

Peer information

§dag_state: DagState

DAG state information

§metrics: StateMachineMetrics

State machine metrics

§last_saved: u64

Timestamp when state was last saved