kaspa_consensus_core/errors/
sync.rs

1use kaspa_hashes::Hash;
2use thiserror::Error;
3
4#[derive(Error, Debug, Clone)]
5pub enum SyncManagerError {
6    #[error("low hash {0} is not in selected parent chain")]
7    BlockNotInSelectedParentChain(Hash),
8
9    #[error("low hash {0} is higher than high hash {1}")]
10    LowHashHigherThanHighHash(Hash, Hash),
11
12    #[error("pruning point {0} is not on selected parent chain of {1}")]
13    PruningPointNotInChain(Hash, Hash),
14
15    #[error("block locator low hash {0} is not on selected parent chain of high hash {1}")]
16    LocatorLowHashNotInHighHashChain(Hash, Hash),
17}
18
19pub type SyncManagerResult<T> = std::result::Result<T, SyncManagerError>;