nmt_rs/simple_merkle/
error.rs

1/// An error that occurred while trying to check a claimed range proof for a merkle tree.
2#[derive(Debug, PartialEq, Clone, Copy)]
3pub enum RangeProofError {
4    /// The tree is not empty, but no leaves were provided. This proof is malformed - even proofs of absence must provide a leaf.
5    NoLeavesProvided,
6    /// The proof is malformed - the number of leaves provided does not match the claimed size of the range
7    WrongAmountOfLeavesProvided,
8    /// The claimed proof does not verify against the provided root
9    InvalidRoot,
10    /// The claimed range was invalid because it left out a leaf
11    MissingLeaf,
12    /// The proof is missing a node that was needed for verification
13    MissingProofNode,
14    /// A claimed leaf was not actually present in the tree
15    TreeDoesNotContainLeaf,
16    /// The claimed tree exceeds the maximum allowed size (currently 2^32 leaves)
17    TreeTooLarge,
18    /// Indicates that the tree is not properly ordered by namespace
19    MalformedTree,
20    /// A catch all error which indicates that the proof is malformed
21    MalformedProof(&'static str),
22}