34 lines
879 B
Rust
34 lines
879 B
Rust
|
use types::{Epoch, Hash256};
|
||
|
|
||
|
#[derive(Clone, PartialEq, Debug)]
|
||
|
pub enum Error {
|
||
|
FinalizedNodeUnknown(Hash256),
|
||
|
JustifiedNodeUnknown(Hash256),
|
||
|
InvalidFinalizedRootChange,
|
||
|
InvalidNodeIndex(usize),
|
||
|
InvalidParentIndex(usize),
|
||
|
InvalidBestChildIndex(usize),
|
||
|
InvalidJustifiedIndex(usize),
|
||
|
InvalidBestDescendant(usize),
|
||
|
InvalidParentDelta(usize),
|
||
|
InvalidNodeDelta(usize),
|
||
|
DeltaOverflow(usize),
|
||
|
IndexOverflow(&'static str),
|
||
|
InvalidDeltaLen {
|
||
|
deltas: usize,
|
||
|
indices: usize,
|
||
|
},
|
||
|
RevertedFinalizedEpoch {
|
||
|
current_finalized_epoch: Epoch,
|
||
|
new_finalized_epoch: Epoch,
|
||
|
},
|
||
|
InvalidBestNode {
|
||
|
start_root: Hash256,
|
||
|
justified_epoch: Epoch,
|
||
|
finalized_epoch: Epoch,
|
||
|
head_root: Hash256,
|
||
|
head_justified_epoch: Epoch,
|
||
|
head_finalized_epoch: Epoch,
|
||
|
},
|
||
|
}
|