fix: Replace a return with unreachable!

This commit is contained in:
teor 2020-07-27 16:30:46 +10:00 committed by Deirdre Connolly
parent 842c69c60c
commit 2d3926e800
1 changed files with 3 additions and 4 deletions

View File

@ -240,8 +240,6 @@ impl CheckpointVerifier {
let mut pending_height = match self.previous_checkpoint_height() {
// Check if we have the genesis block as a special case, to simplify the loop
BeforeGenesis if !self.queued.contains_key(&BlockHeight(0)) => {
// XXX scratch tracing line for debugging, delete this
tracing::debug!("beforegenesis if !self.queued.contains_key(&BlockHeight(0))");
return WaitingForBlocks;
}
BeforeGenesis => BlockHeight(0),
@ -537,8 +535,9 @@ impl CheckpointVerifier {
tracing::debug!("waiting for blocks to complete checkpoint range");
return;
}
// XXX(hdevalence) should this be unreachable!("called after finished") ?
_ => return,
FinishedVerifying => {
unreachable!("the FinalCheckpoint case should have returned earlier")
}
};
// Keep the old previous checkpoint height, to make sure we're making