Skip to content

Commit

Permalink
Handle genesis payload edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
jbearer committed Nov 16, 2024
1 parent 916646a commit 0c3af7c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sequencer/src/persistence/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,10 @@ async fn collect_garbage(
if let Some(proposal) = da_proposals.remove(&view) {
let payload = Payload::from_bytes(&proposal.encoded_transactions, &proposal.metadata);
leaf.fill_block_payload_unchecked(payload);
} else if view == ViewNumber::genesis().u64() {
// We don't get a DA proposal for the genesis view, but we know what the payload always
// is.
leaf.fill_block_payload_unchecked(Payload::empty().0);
} else {
tracing::debug!(view, "DA proposal not available at decide");
}
Expand Down

0 comments on commit 0c3af7c

Please sign in to comment.