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
@@ -29,7 +29,7 @@ use sync::PrivateTxHandler;
|
||||
use ethcore::client::{Client, ClientConfig, ChainNotify, ClientIoMessage};
|
||||
use ethcore::miner::Miner;
|
||||
use ethcore::snapshot::service::{Service as SnapshotService, ServiceParams as SnapServiceParams};
|
||||
use ethcore::snapshot::{RestorationStatus};
|
||||
use ethcore::snapshot::{SnapshotService as _SnapshotService, RestorationStatus};
|
||||
use ethcore::spec::Spec;
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
|
||||
@@ -168,6 +168,11 @@ impl ClientService {
|
||||
|
||||
/// Get a handle to the database.
|
||||
pub fn db(&self) -> Arc<KeyValueDB> { self.database.clone() }
|
||||
|
||||
/// Shutdown the Client Service
|
||||
pub fn shutdown(&self) {
|
||||
self.snapshot.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
/// IO interface for the Client handler
|
||||
|
||||
Reference in New Issue
Block a user