Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
introduce MissingParent Error, fixes #10699 (#10700)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazaridis authored and dvdplm committed May 31, 2019
1 parent 7e89bab commit 33d3bfa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ethcore/src/engines/authority_round/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ impl AuthorityRound {

if !epoch_manager.zoom_to_after(&*client, &self.machine, &*self.validators, *header.parent_hash()) {
debug!(target: "engine", "Unable to zoom to epoch.");
return Err(EngineError::RequiresClient.into())
return Err(EngineError::MissingParent.into())
}

(CowLike::Owned(epoch_manager.validators().clone()), epoch_manager.epoch_transition_number)
Expand Down
3 changes: 3 additions & 0 deletions ethcore/src/engines/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ pub enum EngineError {
InvalidEngine,
/// Requires signer ref, but none registered.
RequiresSigner,
/// Missing Parent Epoch
MissingParent,
/// Checkpoint is missing
CliqueMissingCheckpoint(H256),
/// Missing vanity data
Expand Down Expand Up @@ -137,6 +139,7 @@ impl fmt::Display for EngineError {
RequiresClient => format!("Call requires client but none registered"),
RequiresSigner => format!("Call requires signer but none registered"),
InvalidEngine => format!("Invalid engine specification or implementation"),
MissingParent => format!("Parent Epoch is missing from database"),
};

f.write_fmt(format_args!("Engine error ({})", msg))
Expand Down

0 comments on commit 33d3bfa

Please sign in to comment.