Shutdown the Snapshot Service early (#8658)
* Shutdown the Snapshot Service when shutting down the runner * Rename `service` to `client_service` * Fix tests
This commit is contained in:
committed by
Andronik Ordian
parent
68d16b723a
commit
7fcb082cad
@@ -743,6 +743,10 @@ impl SnapshotService for Service {
|
||||
trace!("Error sending snapshot service message: {:?}", e);
|
||||
}
|
||||
}
|
||||
|
||||
fn shutdown(&self) {
|
||||
self.abort_restore();
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for Service {
|
||||
|
||||
@@ -54,4 +54,7 @@ pub trait SnapshotService : Sync + Send {
|
||||
/// Feed a raw block chunk to the service to be processed asynchronously.
|
||||
/// no-op if currently restoring.
|
||||
fn restore_block_chunk(&self, hash: H256, chunk: Bytes);
|
||||
|
||||
/// Shutdown the Snapshot Service by aborting any ongoing restore
|
||||
fn shutdown(&self);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user