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

Commit

Permalink
Include missing parent hash in MissingParent error
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdplm committed Jun 11, 2019
1 parent d09fea8 commit 67dda77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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 @@ -738,7 +738,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::MissingParent.into())
return Err(EngineError::MissingParent(*header.parent_hash()).into())
}

(CowLike::Owned(epoch_manager.validators().clone()), epoch_manager.epoch_transition_number)
Expand Down
4 changes: 2 additions & 2 deletions ethcore/src/engines/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub enum EngineError {
/// Requires signer ref, but none registered.
RequiresSigner,
/// Missing Parent Epoch
MissingParent,
MissingParent(H256),
/// Checkpoint is missing
CliqueMissingCheckpoint(H256),
/// Missing vanity data
Expand Down Expand Up @@ -139,7 +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"),
MissingParent(ref hash) => format!("Parent Epoch is missing from database: {}", hash),
};

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

0 comments on commit 67dda77

Please sign in to comment.