Use MinEpochsForDataColumnSidecarsRequest in WithinDAPeriod for Fulu (#15522)

* Use MinEpochsForDataColumnSidecarsRequest in WithinDAPeriod for Fulu

* Make fixes

* Add blank line
This commit is contained in:
Justin Traglia
2025-07-23 08:35:27 -05:00
committed by GitHub
parent 856742ff68
commit bc209cadab
3 changed files with 9 additions and 3 deletions

View File

@@ -498,7 +498,11 @@ func FuluEnabled() bool {
return BeaconConfig().FuluForkEpoch < math.MaxUint64
}
// WithinDAPeriod checks if the block epoch is within MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS of the given current epoch.
// WithinDAPeriod checks if the block epoch is within the data availability retention period.
func WithinDAPeriod(block, current primitives.Epoch) bool {
if block >= BeaconConfig().FuluForkEpoch {
return block+BeaconConfig().MinEpochsForDataColumnSidecarsRequest >= current
}
return block+BeaconConfig().MinEpochsForBlobsSidecarsRequest >= current
}