From 207364929c9f82e9cc40bf108ffa28278a2d943b Mon Sep 17 00:00:00 2001 From: keorn Date: Thu, 24 Nov 2016 13:55:16 +0000 Subject: [PATCH] improve error types --- ethcore/src/error.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ethcore/src/error.rs b/ethcore/src/error.rs index 5ba4aa0c2..cadb4fb1f 100644 --- a/ethcore/src/error.rs +++ b/ethcore/src/error.rs @@ -171,9 +171,9 @@ pub enum BlockError { /// The same author issued different votes at the same step. DoubleVote(H160), /// The received block is from an incorrect proposer. - NotProposer(H160), + NotProposer(Mismatch), /// Signature does not belong to an authority. - NotAuthority(H160) + NotAuthorized(H160) } impl fmt::Display for BlockError { @@ -208,8 +208,8 @@ impl fmt::Display for BlockError { UnknownParent(ref hash) => format!("Unknown parent: {}", hash), UnknownUncleParent(ref hash) => format!("Unknown uncle parent: {}", hash), DoubleVote(ref address) => format!("Author {} issued too many blocks.", address), - NotProposer(ref address) => format!("Author {} is not a current proposer.", address), - NotAuthority(ref address) => format!("Signer {} is not authorized.", address), + NotProposer(ref mis) => format!("Author is not a current proposer: {}", mis), + NotAuthorized(ref address) => format!("Signer {} is not authorized.", address), }; f.write_fmt(format_args!("Block error ({})", msg))