Skip to content

Commit d317fea

Browse files
committed
Address review
Signed-off-by: Jakub Sztandera <[email protected]>
1 parent 34bf3b8 commit d317fea

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

ipld/amt/fuzz/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ ahash = "0.6"
1515

1616
cid = { version = "0.8.2", default-features = false, features = ["serde-codec"] }
1717

18-
fvm_ipld_amt = {path = ".."}
19-
fvm_shared = {path = "../../../shared"}
18+
fvm_ipld_amt = { path = ".."}
19+
fvm_shared = { path = "../../../shared" }
2020

2121
# Prevent this from interfering with workspaces
2222
[workspace]

ipld/amt/fuzz/fuzz_targets/equivalence.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,18 @@ fn execute(ops: Vec<Operation>) -> (Cid, ahash::AHashMap<u64, u64>) {
5151
(amt.flush().unwrap(), elements)
5252
}
5353

54+
// Verifies that AMT created by this order of operations results in the same CID as
55+
// AMT created by minimal number of operations required.
56+
// The aim is to verify lack of past memory in the AMT structures.
57+
// AMT with same elements should have the same CID, regardless of their past.
5458
fuzz_target!(|ops: Vec<Operation>| {
5559
let (res_cid, m) = execute(ops);
5660

57-
let simplfied_ops = m.iter().map(|(k ,v)| {
61+
let simplified_ops = m.iter().map(|(k ,v)| {
5862
Operation{idx: *k, method: Method::Insert(*v)}
5963
}).collect();
6064

61-
let (simplified_cid, _) = execute(simplfied_ops);
65+
let (simplified_cid, _) = execute(simplified_ops);
6266

6367
assert_eq!(res_cid, simplified_cid)
6468
});

ipld/hamt/fuzz/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ libfuzzer-sys = "0.3"
1313
arbitrary = { version = "0.4", features = ["derive"] }
1414
ahash = "0.6"
1515

16-
fvm_ipld_hamt = {path = ".."}
17-
fvm_shared = {path = "../../../shared"}
16+
fvm_ipld_hamt = { path = ".." }
17+
fvm_shared = { path = "../../../shared" }
1818

1919

2020
# Prevent this from interfering with workspaces

0 commit comments

Comments
 (0)