Commit 4b5000e
committed
refactor!: Remove feature
The so-called “MockMMR” is a historic artifact that is unused in direct
dependencies. Turn it into a type that is accessible only from unit
tests and remove the feature `mock` to slim down the public API.
Replace `hashbrown::HashSet` with `std::collections::HashSet`, which
amounts to the same thing but allows removing the direct dependency on
`hashbrown`.
Other changes, only relevant for developers of twenty-first:
- rename the “MockMMR” to the more canonical “ArchivalMMR”.
- reflect the internals more accurately by renaming the collection of
all nodes from “leafs” to “nodes”
- remove helper struct `MyVec<_>`
- replace some helper functions with sane initialize functions
- reduce visibility of some internal helper functions
- rework documentation in some placesmock
1 parent c1d8b94 commit 4b5000e
9 files changed
Lines changed: 440 additions & 615 deletions
File tree
- twenty-first
- src
- mock
- mmr
- util_types
- mmr
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 18 | | |
23 | 19 | | |
24 | 20 | | |
| |||
38 | 34 | | |
39 | 35 | | |
40 | 36 | | |
41 | | - | |
42 | 37 | | |
43 | 38 | | |
44 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 9 | | |
13 | 10 | | |
14 | 11 | | |
| |||
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
67 | | - | |
68 | 64 | | |
69 | 65 | | |
70 | 66 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
0 commit comments