refactor!: Remove feature mock#261
Merged
jan-ferdinand merged 1 commit intomasterfrom Jun 17, 2025
Merged
Conversation
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 places
Sword-Smith
approved these changes
Jun 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The so-called “MockMMR” is a historic artifact that is unused in direct dependencies. This PR turns it into a type that is accessible only from unit tests and remove the feature
mockto slim down the public API.Replace
hashbrown::HashSetwithstd::collections::HashSet, which amounts to the same thing but allows removing the direct dependency onhashbrown.Other changes, only relevant for developers of twenty-first:
MyVec<_>