Skip to content

Commit

Permalink
Fix comment for blob sidecar observation pruning (#4893)
Browse files Browse the repository at this point in the history
## Issue Addressed

The comment implies that observations for the given slot would be retained but they are not.

## Proposed Changes

I'm pretty sure the functionality is correct and the comment is slightly incorrect, so just update the comment. The comment needs to say something along the lines of "less than or equal to" rather than just "less than."

## Additional Info

It doesn't make sense to keep finalized observations since those are no longer accepted.
  • Loading branch information
jtraglia committed Nov 3, 2023
1 parent 36d8849 commit f2aabe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/src/observed_blob_sidecars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl<T: EthSpec> ObservedBlobSidecars<T> {
Ok(())
}

/// Prune all values earlier than the given slot.
/// Prune `blob_sidecar` observations for slots less than or equal to the given slot.
pub fn prune(&mut self, finalized_slot: Slot) {
if finalized_slot == 0 {
return;
Expand Down

0 comments on commit f2aabe9

Please sign in to comment.