use thiserror::Error;
#[allow(missing_docs)]
#[derive(Error, Debug, PartialEq, Eq)]
pub enum Error {
#[error("signature check failed")]
FailedSignature,
#[error("key not found in the chain")]
KeyNotFound,
#[error("no sub-chain was found in the chain")]
SubChainNotFound,
#[error("chain doesn't contain any trusted keys")]
Untrusted,
#[error("attempted operation is invalid")]
InvalidOperation,
}
#[derive(Debug, Error, Eq, PartialEq)]
pub(crate) enum IntegrityError {
#[error("signature check failed")]
FailedSignature,
#[error("parent key not found in the chain")]
ParentNotFound,
#[error("chain blocks are in a wrong order")]
WrongBlockOrder,
}