mirror of
https://github.com/pezkuwichain/merkle-mountain-range.git
synced 2026-07-05 15:47:24 +00:00
feat: check nodes (or peaks) before merge them
This commit is contained in:
@@ -9,6 +9,9 @@ pub enum Error {
|
||||
CorruptedProof,
|
||||
/// The leaves is an empty list, or beyond the mmr range
|
||||
GenProofForInvalidLeaves,
|
||||
|
||||
/// The two nodes couldn't merge into one.
|
||||
MergeError(crate::string::String),
|
||||
}
|
||||
|
||||
impl core::fmt::Display for Error {
|
||||
@@ -20,6 +23,7 @@ impl core::fmt::Display for Error {
|
||||
StoreError(msg) => write!(f, "Store error {}", msg)?,
|
||||
CorruptedProof => write!(f, "Corrupted proof")?,
|
||||
GenProofForInvalidLeaves => write!(f, "Generate proof ofr invalid leaves")?,
|
||||
MergeError(msg) => write!(f, "Merge error {}", msg)?,
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user