Remove unnecessary new_banks_from_blockstore() argument (#8433)

automerge
This commit is contained in:
Michael Vines 2020-02-25 00:27:19 -07:00 committed by GitHub
parent 0fe74e95fe
commit 2059af822d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 9 deletions

View File

@ -167,12 +167,7 @@ impl Validator {
completed_slots_receiver,
leader_schedule_cache,
snapshot_hash,
) = new_banks_from_blockstore(
config.expected_genesis_hash,
ledger_path,
poh_verify,
config,
);
) = new_banks_from_blockstore(config, ledger_path, poh_verify);
let leader_schedule_cache = Arc::new(leader_schedule_cache);
let exit = Arc::new(AtomicBool::new(false));
@ -545,10 +540,9 @@ impl Validator {
#[allow(clippy::type_complexity)]
fn new_banks_from_blockstore(
expected_genesis_hash: Option<Hash>,
config: &ValidatorConfig,
blockstore_path: &Path,
poh_verify: bool,
config: &ValidatorConfig,
) -> (
GenesisConfig,
BankForks,
@ -574,7 +568,7 @@ fn new_banks_from_blockstore(
let genesis_hash = genesis_config.hash();
info!("genesis hash: {}", genesis_hash);
if let Some(expected_genesis_hash) = expected_genesis_hash {
if let Some(expected_genesis_hash) = config.expected_genesis_hash {
if genesis_hash != expected_genesis_hash {
error!("genesis hash mismatch: expected {}", expected_genesis_hash);
error!(