kaspa-consensus-core 0.15.0

Kaspa consensus core
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use thiserror::Error;

#[derive(Error, Debug, Clone)]
pub enum DifficultyError {
    #[error("under min allowed window size ({0} < {1})")]
    UnderMinWindowSizeAllowed(usize, usize),

    #[error("window data has only {0} entries -- this usually happens when the node has just began syncing")]
    InsufficientWindowData(usize),

    #[error("min window timestamp is equal to the max window timestamp")]
    EmptyTimestampRange,
}

pub type DifficultyResult<T> = std::result::Result<T, DifficultyError>;