Skip to content

Commit

Permalink
wip: use cleaner protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
dndll committed Dec 21, 2023
1 parent 362ba10 commit f155d02
Show file tree
Hide file tree
Showing 5 changed files with 887 additions and 876 deletions.
14 changes: 12 additions & 2 deletions src/client/error.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
#[derive(Debug, Eq, PartialEq)]
use thiserror::Error;

#[derive(Error, Debug, PartialEq, Eq)]
pub enum Error {
#[error("Block already verified")]
BlockAlreadyVerified,
#[error("Block not current or next epoch")]
BlockNotCurrentOrNextEpoch,
BlockMissingNextBps,
#[error("Signature invalid")]
SignatureInvalid,
#[error("Not enough approved stake")]
NotEnoughApprovedStake,
#[error("Block is in the next epoch but no new set")]
NextBpsInvalid,
#[error("Signature len mismatch")]
SignatureLenMismatch,
#[error("Invalid proof")]
InvalidProof,
}
Loading

0 comments on commit f155d02

Please sign in to comment.