lighthouse/consensus/proto_array_fork_choice/src/error.rs
Paul Hauner 4331834003
Directory Restructure (#1163)
* Move tests -> testing

* Directory restructure

* Update Cargo.toml during restructure

* Update Makefile during restructure

* Fix arbitrary path
2020-05-18 21:24:23 +10:00

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,
},
}