Skip to content

Commit

Permalink
fix compilation again
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected committed Jul 11, 2024
1 parent b5f267c commit 7083c5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions crates/engine/tree/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct DatabaseService<DB> {
/// Handle for the static file service.
static_file_handle: StaticFileServiceHandle,
/// The pruner
pruner: Pruner<DB>,
pruner: Pruner<DB, ProviderFactory<DB>>,
}

impl<DB: Database> DatabaseService<DB> {
Expand All @@ -43,7 +43,7 @@ impl<DB: Database> DatabaseService<DB> {
provider: ProviderFactory<DB>,
incoming: Receiver<DatabaseAction>,
static_file_handle: StaticFileServiceHandle,
pruner: Pruner<DB>,
pruner: Pruner<DB, ProviderFactory<DB>>,
) -> Self {
Self { provider, incoming, static_file_handle, pruner }
}
Expand Down Expand Up @@ -79,17 +79,13 @@ impl<DB: Database> DatabaseService<DB> {
// Write state and changesets to the database.
// Must be written after blocks because of the receipt lookup.
let execution_outcome = block.execution_outcome().clone();
execution_outcome.write_to_storage(
provider_rw.tx_ref(),
None,
OriginalValuesKnown::No,
)?;
execution_outcome.write_to_storage(&provider_rw, None, OriginalValuesKnown::No)?;

// insert hashes and intermediate merkle nodes
{
let trie_updates = block.trie_updates().clone();
let hashed_state = block.hashed_state();
HashedStateChanges(hashed_state.clone()).write_to_db(provider_rw.tx_ref())?;
HashedStateChanges(hashed_state.clone()).write_to_db(&provider_rw)?;
trie_updates.write_to_database(provider_rw.tx_ref())?;
}

Expand Down
2 changes: 1 addition & 1 deletion crates/engine/tree/src/persistence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl PersistenceHandle {
/// Create a new [`PersistenceHandle`], and spawn the database and static file services.
pub fn spawn_services<DB: Database + 'static>(
provider_factory: ProviderFactory<DB>,
pruner: Pruner<DB>,
pruner: Pruner<DB, ProviderFactory<DB>>,
) -> Self {
// create the initial channels
let (static_file_service_tx, static_file_service_rx) = std::sync::mpsc::channel();
Expand Down

0 comments on commit 7083c5e

Please sign in to comment.