Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ledger/src/blockstore_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2135,6 +2135,11 @@ fn process_bank_0(
err @ BlockstoreProcessorError::InvalidTransaction(_) => panic!("{err}"),
_ => BlockstoreProcessorError::FailedToReplayBank0,
})?;
bank0.set_block_id(Some(
blockstore
.get_block_id(bank0.slot(), migration_status)?
.expect("block id for a full slot must exist"),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I typically prefer error propagation but am fine with the expect() here given that:

  • confirm_full_slot() will fail if slot 0 is not full
  • We do want to confirm it is a Some(_) instead of passing a None through and hiding the issue

That is, the slot will have to have been made not full between now and confirm_full_slot() (the function call above) in order for this to fail

));
bank0.freeze();
if blockstore.is_primary_access() {
blockstore.insert_bank_hash(bank0.slot(), bank0.hash(), false);
Expand Down
Loading