Skip to content

Commit

Permalink
remove OwnedCursorFactories
Browse files Browse the repository at this point in the history
  • Loading branch information
fgimenez committed Jan 10, 2025
1 parent c227e57 commit 7ebcaa8
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions crates/engine/tree/src/tree/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,22 +1012,13 @@ mod tests {
provider: &DatabaseProvider<_, _>| {
let tx = provider.tx_ref();

struct OwnedCursorFactories<'a> {
trie_cursor:
DatabaseTrieCursorFactory<'a, reth_db::mdbx::tx::Tx<reth_db::mdbx::RO>>,
hashed_cursor:
DatabaseHashedCursorFactory<'a, reth_db::mdbx::tx::Tx<reth_db::mdbx::RO>>,
}

let cursors = OwnedCursorFactories {
trie_cursor: DatabaseTrieCursorFactory::new(tx),
hashed_cursor: DatabaseHashedCursorFactory::new(tx),
};
let trie_cursor = DatabaseTrieCursorFactory::new(tx);
let hashed_cursor = DatabaseHashedCursorFactory::new(tx);

let trie_cursor_factory =
InMemoryTrieCursorFactory::new(cursors.trie_cursor, &nodes_sorted);
InMemoryTrieCursorFactory::new(trie_cursor, &nodes_sorted);
let hashed_cursor_factory =
HashedPostStateCursorFactory::new(cursors.hashed_cursor, &state_sorted);
HashedPostStateCursorFactory::new(hashed_cursor, &state_sorted);

ProofBlindedProviderFactory::new(
trie_cursor_factory,
Expand Down

0 comments on commit 7ebcaa8

Please sign in to comment.