abort snapshot restoration faster (#3356)

* abort snapshot restoration faster

* flag-checking tests
This commit is contained in:
Robert Habermeier
2016-11-13 13:52:53 +01:00
committed by Gav Wood
parent 0c302376b6
commit 37f49aac1b
6 changed files with 144 additions and 32 deletions

View File

@@ -73,7 +73,7 @@ pub trait SyncProvider: Send + Sync {
/// Get peers information
fn peers(&self) -> Vec<PeerInfo>;
/// Get the enode if available.
fn enode(&self) -> Option<String>;
}
@@ -231,6 +231,7 @@ impl ChainNotify for EthSync {
}
fn stop(&self) {
self.handler.snapshot_service.abort_restore();
self.network.stop().unwrap_or_else(|e| warn!("Error stopping network: {:?}", e));
}
}