Create bank snapshots (#4244)

* Revert "Revert "Create bank snapshots (#3671)" (#4243)"

This reverts commit 81fa69d347.

* keep saved and unsaved copies of status cache

* fix format check

* bench for status cache serialize

* misc cleanup

* remove appendvec storage on purge

* fix accounts restore

* cleanup

* Pass snapshot path as args

* Fix clippy
This commit is contained in:
Sathish
2019-05-30 21:31:35 -07:00
committed by GitHub
parent 2d284ba6db
commit 182096dc1a
29 changed files with 1467 additions and 175 deletions

View File

@ -156,7 +156,14 @@ fn main() {
.validator(port_range_validator)
.help("Range to use for dynamically assigned ports"),
)
.get_matches();
.arg(
clap::Arg::with_name("snapshot_path")
.long("snapshot-path")
.value_name("PATHS")
.takes_value(true)
.help("Snapshot path"),
)
.get_matches();
let mut validator_config = ValidatorConfig::default();
let keypair = if let Some(identity) = matches.value_of("identity") {
@ -220,6 +227,11 @@ fn main() {
} else {
validator_config.account_paths = None;
}
if let Some(paths) = matches.value_of("snapshot_path") {
validator_config.snapshot_path = Some(paths.to_string());
} else {
validator_config.snapshot_path = None;
}
let cluster_entrypoint = matches.value_of("entrypoint").map(|entrypoint| {
let entrypoint_addr = solana_netutil::parse_host_port(entrypoint)
.expect("failed to parse entrypoint address");