-
Notifications
You must be signed in to change notification settings - Fork 658
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[resharding] Simplify GenericTrieUpdateRetain interface and move tests (
#12518) core/store/src/trie/mem/resharding.rs had the implementation for the resharding retain function for both memtrie and trie. That didn't feel like a great as this ideally should have been part of mem_trie_update.rs and trie_storage_update.rs respectively. Additionally, it felt like we are exposing the inner function implementation with `self.retain_multi_range_recursive(0, vec![], &intervals_nibbles)`. This PR wraps the core functionality of `retain_split_shard` into the `GenericTrieUpdateRetain` interface while keeping the private functions of GenericTrieUpdateRetain in a separate inner trait `GenericTrieUpdateRetainInner` that is not exposed outside the file. The tests in core/store/src/trie/mem/resharding.rs are moved to a separate file without any functional change.
- Loading branch information
1 parent
d2dcf6f
commit 2148dca
Showing
8 changed files
with
468 additions
and
431 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.