Fail fast if account paths cannot be canonicalized (#7300)

* Canonicalize account paths to avoid symlink issues

* fixes
This commit is contained in:
Justin Starry
2019-12-05 21:41:29 -05:00
committed by GitHub
parent 7c3be2ec9a
commit b7d4330dd4
13 changed files with 123 additions and 125 deletions

View File

@ -295,7 +295,7 @@ mod tests {
..ProcessOptions::default()
};
let (bank_forks, _, cached_leader_schedule) =
process_blocktree(&genesis_config, &blocktree, None, opts).unwrap();
process_blocktree(&genesis_config, &blocktree, Vec::new(), opts).unwrap();
let leader_schedule_cache = Arc::new(cached_leader_schedule);
let bank_forks = Arc::new(RwLock::new(bank_forks));

View File

@ -60,7 +60,7 @@ pub struct ValidatorConfig {
pub transaction_status_service_disabled: bool,
pub blockstream_unix_socket: Option<PathBuf>,
pub storage_slots_per_turn: u64,
pub account_paths: Option<String>,
pub account_paths: Vec<PathBuf>,
pub rpc_config: JsonRpcConfig,
pub snapshot_config: Option<SnapshotConfig>,
pub max_ledger_slots: Option<u64>,
@ -80,7 +80,7 @@ impl Default for ValidatorConfig {
blockstream_unix_socket: None,
storage_slots_per_turn: DEFAULT_SLOTS_PER_TURN,
max_ledger_slots: None,
account_paths: None,
account_paths: Vec::new(),
rpc_config: JsonRpcConfig::default(),
snapshot_config: None,
broadcast_stage_type: BroadcastStageType::Standard,
@ -469,7 +469,7 @@ impl Validator {
pub fn new_banks_from_blocktree(
expected_genesis_hash: Option<Hash>,
blocktree_path: &Path,
account_paths: Option<String>,
account_paths: Vec<PathBuf>,
snapshot_config: Option<SnapshotConfig>,
poh_verify: bool,
dev_halt_at_slot: Option<Slot>,