node/transition_frontier/sync/
mod.rs1pub mod ledger;
2
3mod transition_frontier_sync_state;
4pub use transition_frontier_sync_state::*;
5
6mod transition_frontier_sync_actions;
7pub use transition_frontier_sync_actions::*;
8
9mod transition_frontier_sync_reducer;
10
11mod transition_frontier_sync_effects;
12
13use openmina_core::block::ArcBlockWithHash;
14use serde::{Deserialize, Serialize};
15
16#[derive(Serialize, Deserialize, Debug, Clone)]
17pub enum PeerBlockFetchError {
18 Timeout,
19 Disconnected,
20 DataUnavailable,
21}
22
23#[derive(thiserror::Error, Serialize, Deserialize, Debug, Clone)]
24pub enum SyncError {
25 #[error("sync failed due to block({}, {}) application error: {1}", .0.height(), .0.hash())]
26 BlockApplyFailed(ArcBlockWithHash, String),
27}
28
29const CATCHUP_BLOCK_VERIFY_TAIL_LENGTH: usize = 5;