Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: typos #249

Merged
merged 3 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ For example, a new change to the AIR crate might have the following message: `fe
// ================================================================================
```

- [Rustfmt](https://github.com/rust-lang/rustfmt) and [Clippy](https://github.com/rust-lang/rust-clippy) linting is included in CI pipeline. Anyways it's prefferable to run linting locally before push:
- [Rustfmt](https://github.com/rust-lang/rustfmt) and [Clippy](https://github.com/rust-lang/rust-clippy) linting is included in CI pipeline. Anyways it's preferable to run linting locally before push:
```
cargo fix --allow-staged --allow-dirty --all-targets --all-features; cargo fmt; cargo clippy --workspace --all-targets --all-features -- -D warnings
```
Expand Down
2 changes: 1 addition & 1 deletion src/merkle/mmr/full.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ impl Mmr {
// Update the depth of the tree to correspond to a subtree
forest_target >>= 1;

// compute the indeces of the right and left subtrees based on the post-order
// compute the indices of the right and left subtrees based on the post-order
let right_offset = index - 1;
let left_offset = right_offset - nodes_in_forest(forest_target);

Expand Down
8 changes: 4 additions & 4 deletions src/merkle/store/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ fn test_merkle_tree() -> Result<(), MerkleError> {
"node 3 must be the same for both MerkleTree and MerkleStore"
);

// STORE MERKLE PATH MATCHS ==============================================================
// STORE MERKLE PATH MATCHES ==============================================================
// assert the merkle path returned by the store is the same as the one in the tree
let result = store.get_path(mtree.root(), NodeIndex::make(mtree.depth(), 0)).unwrap();
assert_eq!(
Expand Down Expand Up @@ -291,7 +291,7 @@ fn test_sparse_merkle_tree() -> Result<(), MerkleError> {
"node 4 must be the same for both SparseMerkleTree and MerkleStore"
);

// STORE MERKLE PATH MATCHS ==============================================================
// STORE MERKLE PATH MATCHES ==============================================================
// assert the merkle path returned by the store is the same as the one in the tree
let result = store.get_path(smt.root(), NodeIndex::make(smt.depth(), 0)).unwrap();
assert_eq!(
Expand Down Expand Up @@ -426,7 +426,7 @@ fn test_add_merkle_paths() -> Result<(), MerkleError> {
"node 3 must be the same for both PartialMerkleTree and MerkleStore"
);

// STORE MERKLE PATH MATCHS ==============================================================
// STORE MERKLE PATH MATCHES ==============================================================
// assert the merkle path returned by the store is the same as the one in the pmt
let result = store.get_path(pmt.root(), NodeIndex::make(pmt.max_depth(), 0)).unwrap();
assert_eq!(
Expand Down Expand Up @@ -653,7 +653,7 @@ fn get_leaf_depth_works_depth_64() {
let index = NodeIndex::new(64, k).unwrap();

// assert the leaf doesn't exist before the insert. the returned depth should always
// increment with the paths count of the set, as they are insersecting one another up to
// increment with the paths count of the set, as they are intersecting one another up to
// the first bits of the used key.
assert_eq!(d, store.get_leaf_depth(root, 64, k).unwrap());

Expand Down
Loading