Add binary, re-org crate

This commit is contained in:
Paul Hauner
2020-01-16 13:55:33 +11:00
parent 72dc6db9dd
commit 4a60c06afe
11 changed files with 1296 additions and 732 deletions

View File

@@ -0,0 +1,31 @@
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 {
justified_epoch: Epoch,
finalized_epoch: Epoch,
node_justified_epoch: Epoch,
node_finalized_epoch: Epoch,
},
}