cfx_executor/state/checkpoints/
checkpoint_entry.rs

1/// An account entry in the checkpoint
2#[derive(Debug, Clone)]
3pub enum CheckpointEntry<T> {
4    /// The account has not been read or modified from the committed state or
5    /// the database.
6    Unchanged,
7    /// The recorded state of the account at this checkpoint. It may be
8    /// modified or unmodified.
9    Recorded(T),
10}
11use CheckpointEntry::*;
12
13impl<T> CheckpointEntry<T> {
14    pub fn from_cache(value: Option<T>) -> Self {
15        match value {
16            Some(v) => Recorded(v),
17            None => Unchanged,
18        }
19    }
20}