mithril_common/chain_reader/
entity.rs

1use crate::cardano_block_scanner::RawCardanoPoint;
2use crate::cardano_block_scanner::ScannedBlock;
3
4/// The action that indicates what to do next when scanning the chain
5#[derive(Debug, Clone, PartialEq)]
6pub enum ChainBlockNextAction {
7    /// RollForward event (we are still on the correct fork)
8    RollForward {
9        /// The parsed chain block
10        parsed_block: ScannedBlock,
11    },
12    /// RollBackward event (we are on an incorrect fork, we need to get back a point to roll forward again)
13    RollBackward {
14        /// The rollback point in the chain to read (as a new valid chain point to read from on the main chain, which has already been seen)
15        rollback_point: RawCardanoPoint,
16    },
17}