cycles-quartz/core/light-client-proofs/tm-stateless-verifier/src/error.rs
hu55a1n1 be68105ec5 repo reorg
Move utils/quartz-proto to core/quartz-proto

Fix Cargo.toml paths

Add default working-directory for cosmwasm CI jobs

Fix default working-directory

Rename .cargo/config -> config.toml

Update working-directory

Update cosmwasm workflows

Update rust.yml paths

Add aliases to cargo config.toml

Test working-directory

Update cosmwasm CI jobs

Use --manifest-path

Use dtolnay/rust-toolchain action

Fix workflow

Remove --locked

SSH agent

SSH agent for schema

Remove unused SSH key

Exclude cw-tee-mtcs from rust CI jobs

Clippy fix

cargo fmt

Add CONTRIBUTING.md

Update README.md
2024-05-21 03:26:41 -07:00

35 lines
941 B
Rust

use alloc::boxed::Box;
use displaydoc::Display;
use tendermint::{block::Height, Hash};
use tendermint_light_client::{
builder::error::Error as TmBuilderError, errors::Error as LightClientError,
};
#[derive(Debug, Display)]
pub enum Error {
/// empty trace
EmptyTrace,
/// first block in trace does not match trusted (expected {expected:?}, found {found:?})
FirstTraceBlockNotTrusted {
expected: (Height, Hash),
found: (Height, Hash),
},
/// verification failure (`{0}`)
VerificationFailure(Box<LightClientError>),
/// failed to build light client (`{0}`)
LightClientBuildFailure(Box<TmBuilderError>),
}
impl From<LightClientError> for Error {
fn from(e: LightClientError) -> Self {
Error::VerificationFailure(Box::new(e))
}
}
impl From<TmBuilderError> for Error {
fn from(e: TmBuilderError) -> Self {
Error::LightClientBuildFailure(Box::new(e))
}
}