mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 08:31:16 +00:00
Make triecache generic and work for no-std environments (#14403)
* Remove `AsLocalTrieCache` trait * Introduce new trait AsTrieDbCache * Use AsTrieDbCache trait * Make it compile * Docs * Improve naming of associated type, implement cache usage for no-std * Improve naming * Improve docs * Allow construction with optional cache * FMT * Remove unused variable * Revert unwanted change * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> * More comment adjustments * Docs * Trigger CI * ".git/.scripts/commands/fmt/fmt.sh" * Apply suggestions from code review Co-authored-by: Koute <koute@users.noreply.github.com> * Review comments * Review comments * Apply suggestions from code review Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> * fmt * Bump trie-db again --------- Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: command-bot <> Co-authored-by: Koute <koute@users.noreply.github.com> Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -529,7 +529,7 @@ impl<'a, H: Hasher> TrieCache<'a, H> {
|
||||
/// `storage_root` is the new storage root that was obtained after finishing all operations
|
||||
/// using the [`TrieDBMut`](trie_db::TrieDBMut).
|
||||
pub fn merge_into(self, local: &LocalTrieCache<H>, storage_root: H::Out) {
|
||||
let cache = if let ValueCache::Fresh(cache) = self.value_cache { cache } else { return };
|
||||
let ValueCache::Fresh(cache) = self.value_cache else { return };
|
||||
|
||||
if !cache.is_empty() {
|
||||
let mut value_cache = local.value_cache.lock();
|
||||
|
||||
Reference in New Issue
Block a user