2020-01-29 04:05:00 +00:00
|
|
|
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,
|
|
|
|
},
|
2021-10-07 11:24:57 +00:00
|
|
|
InvalidAncestorOfValidPayload {
|
|
|
|
ancestor_block_root: Hash256,
|
|
|
|
ancestor_payload_block_hash: Hash256,
|
|
|
|
},
|
2020-01-29 04:05:00 +00:00
|
|
|
}
|