Skip to content

Commit

Permalink
Merge of #8883
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Sep 23, 2024
2 parents c8280d4 + 4c04025 commit 6ccbae8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions zebra-state/src/service/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,16 @@ where
.take(POW_ADJUSTMENT_BLOCK_SPAN)
.collect();

let parent_block = relevant_chain
.first()
.expect("state must contain parent block to do contextual validation");
let Some(parent_block) = relevant_chain.first() else {
warn!(
?semantically_verified,
?finalized_tip_height,
"state must contain parent block to do contextual validation"
);

return Err(ValidateContextError::NotReadyToBeCommitted);
};

let parent_block = parent_block.borrow();
let parent_height = parent_block
.coinbase_height()
Expand Down

0 comments on commit 6ccbae8

Please sign in to comment.