Add a more helpful error on genesis block mismatch (#5744)

automerge
This commit is contained in:
Michael Vines 2019-08-30 09:10:22 -07:00 committed by Grimes
parent f78baf80e4
commit 4786143524
1 changed files with 7 additions and 1 deletions

View File

@ -483,10 +483,16 @@ pub fn new_banks_from_blocktree(
if let Some(expected_genesis_blockhash) = expected_genesis_blockhash {
if genesis_blockhash != expected_genesis_blockhash {
panic!(
error!(
"Genesis blockhash mismatch: expected {} but local genesis blockhash is {}",
expected_genesis_blockhash, genesis_blockhash,
);
error!(
"Delete the ledger directory to continue: {:?}",
blocktree_path
);
// TODO: bubble error up to caller?
std::process::exit(1);
}
}