Skip to content

Commit

Permalink
fix(crypto): typo in README
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfertel committed Mar 18, 2024
1 parent f88c3ab commit 7f79948
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/crypto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Common cryptographic procedures for a blockchain environment.
## Feature Flags

This crate exposes its modules behind feature gates to ensure the bare minimum
is included in consumer condebases. You can check the current feature flags in
is included in consumer codebases. You can check the current feature flags in
the [Cargo.toml](./Cargo.toml) file.
4 changes: 2 additions & 2 deletions lib/crypto/src/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ pub fn verify<H: Hasher<Hash = Bytes32>>(
leaf == root
}

#[derive(core::fmt::Debug)]
/// An error that occurred while verifying a multi-proof.
///
/// TODO: Once <https://github.com/rust-lang/rust/issues/103765> is resolved,
/// we should derive `core::error::Error`.
#[derive(core::fmt::Debug)]
pub enum MultiProofError {
/// The number of leaves and proof members does not match the amount of
/// hashes necessary to complete the verification.
Expand All @@ -105,7 +105,6 @@ impl core::fmt::Display for MultiProofError {
}
}

#[cfg(feature = "multi_proof")]
/// Verify multiple `leaves` can be simultaneously proven to be a part of
/// a Merkle tree defined by `root` by using a `proof` with `proof_flags`
/// and a `hasher`.
Expand Down Expand Up @@ -191,6 +190,7 @@ impl core::fmt::Display for MultiProofError {
/// verify_multi_proof(&proof, &proof_flags, root, &leaves, Keccak256);
/// assert!(verification.unwrap());
/// ```
#[cfg(feature = "multi_proof")]
pub fn verify_multi_proof<H: Hasher<Hash = Bytes32>>(
proof: &[Bytes32],
proof_flags: &[bool],
Expand Down

0 comments on commit 7f79948

Please sign in to comment.