tendermint_light_client/builder/
error.rs1use flex_error::define_error;
4use tendermint::{block::Height, Hash};
5
6use crate::{components::io::IoError, verifier::errors::VerificationError};
7
8define_error! {
9 Error {
10 Io
11 [ IoError ]
12 | _ | { "I/O error" },
13
14 HeightMismatch
15 {
16 given: Height,
17 found: Height,
18 }
19 | e | {
20 format_args!("height mismatch: given = {0}, found = {1}",
21 e.given, e.found)
22 },
23
24 HashMismatch
25 {
26 given: Hash,
27 found: Hash,
28 }
29 | e | {
30 format_args!("hash mismatch: given = {0}, found = {1}",
31 e.given, e.found)
32 },
33
34 InvalidLightBlock
35 [ VerificationError ]
36 | _ | { "invalid light block" },
37
38 NoTrustedStateInStore
39 | _ | { "no trusted state in store" },
40
41 EmptyWitnessList
42 | _ | { "empty witness list" },
43
44 }
45}