refactor(engine): always connect buffered blocks on r/w hook finish (#4657)

This commit is contained in:
Alexey Shekhirin
2023-09-20 13:13:45 +01:00
committed by GitHub
parent afbe88f583
commit 6016da7a12
4 changed files with 51 additions and 50 deletions

View File

@ -6,7 +6,7 @@ use std::{
};
mod controller;
pub(crate) use controller::EngineHooksController;
pub(crate) use controller::{EngineHooksController, PolledHook};
mod prune;
pub use prune::PruneHook;
@ -88,8 +88,6 @@ impl EngineHookEvent {
pub enum EngineHookAction {
/// Notify about a [SyncState] update.
UpdateSyncState(SyncState),
/// Connect blocks buffered during the hook execution to canonical hashes.
ConnectBufferedBlocks,
}
/// An error returned by [hook][`EngineHook`].
@ -107,6 +105,7 @@ pub enum EngineHookError {
}
/// Level of database access the hook needs for execution.
#[derive(Debug, Copy, Clone)]
pub enum EngineHookDBAccessLevel {
/// Read-only database access.
ReadOnly,