spl_concurrent_merkle_tree/
error.rs1use thiserror::Error;
2
3#[derive(Error, Debug, PartialEq, Eq)]
5pub enum ConcurrentMerkleTreeError {
6 #[error("Received an index larger than the rightmost index, or greater than (1 << max_depth)")]
8 LeafIndexOutOfBounds,
9
10 #[error("Invalid root recomputed from proof")]
12 InvalidProof,
13
14 #[error("Cannot append an empty node")]
16 CannotAppendEmptyNode,
17
18 #[error("Tree is full, cannot append")]
20 TreeFull,
21
22 #[error("Tree already initialized")]
24 TreeAlreadyInitialized,
25
26 #[error("Tree needs to be initialized before using")]
28 TreeNotInitialized,
29
30 #[error("Root not found in changelog buffer")]
32 RootNotFound,
33
34 #[error("This tree's current leaf value does not match the supplied proof's leaf value")]
37 LeafContentsModified,
38
39 #[error("Tree is not empty")]
41 TreeNonEmpty,
42}