mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
perf(trie): avoid (de)allocating an extra prefix set (#13020)
This commit is contained in:
@ -43,6 +43,7 @@ impl<'a, TX: DbTx> DatabaseStorageRoot<'a, TX>
|
||||
DatabaseTrieCursorFactory::new(tx),
|
||||
DatabaseHashedCursorFactory::new(tx),
|
||||
address,
|
||||
Default::default(),
|
||||
#[cfg(feature = "metrics")]
|
||||
TrieRootMetrics::new(TrieType::Storage),
|
||||
)
|
||||
@ -53,6 +54,7 @@ impl<'a, TX: DbTx> DatabaseStorageRoot<'a, TX>
|
||||
DatabaseTrieCursorFactory::new(tx),
|
||||
DatabaseHashedCursorFactory::new(tx),
|
||||
hashed_address,
|
||||
Default::default(),
|
||||
#[cfg(feature = "metrics")]
|
||||
TrieRootMetrics::new(TrieType::Storage),
|
||||
)
|
||||
@ -70,10 +72,10 @@ impl<'a, TX: DbTx> DatabaseStorageRoot<'a, TX>
|
||||
DatabaseTrieCursorFactory::new(tx),
|
||||
HashedPostStateCursorFactory::new(DatabaseHashedCursorFactory::new(tx), &state_sorted),
|
||||
address,
|
||||
prefix_set,
|
||||
#[cfg(feature = "metrics")]
|
||||
TrieRootMetrics::new(TrieType::Storage),
|
||||
)
|
||||
.with_prefix_set(prefix_set)
|
||||
.root()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user