1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use std::str::Utf8Error;
#[derive(thiserror::Error, Debug, Eq, PartialEq)]
pub enum ConsensusError {
#[error("header must have height 1 greater than top")]
InvalidHeight,
#[error("Top block not found")]
TopBlockNotFound,
#[error("Global slot not found")]
GlobalSlotNotFound,
#[error("Consensus state not found")]
ConsensusStateNotFound,
#[error("candidates not found")]
CandidatesNotFound,
#[error("Candidates missing some sub window densities")]
CandidatesMissingSubWindowDensities,
#[error("Invalid sub window density length")]
InvalidSubWindowDensityLen,
#[error("Could not generate blake2b digest of last vrf output: {0}")]
FailedVrfHashDigest(Utf8Error),
}