Fix disable backfill flag not working correctly (#4615)

## Issue Addressed

The feature flag used to control this feature is `disable_backfill` instead of `disable-backfill`.

kudos to @michaelsproul for discovering this bug!
This commit is contained in:
Jimmy Chen 2023-08-14 06:08:34 +00:00
parent 249f85f1d9
commit 59c24bcd2d

View File

@ -395,7 +395,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
// If we would otherwise be synced, first check if we need to perform or
// complete a backfill sync.
#[cfg(not(feature = "disable_backfill"))]
#[cfg(not(feature = "disable-backfill"))]
if matches!(sync_state, SyncState::Synced) {
// Determine if we need to start/resume/restart a backfill sync.
match self.backfill_sync.start(&mut self.network) {
@ -420,7 +420,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
}
Some((RangeSyncType::Finalized, start_slot, target_slot)) => {
// If there is a backfill sync in progress pause it.
#[cfg(not(feature = "disable_backfill"))]
#[cfg(not(feature = "disable-backfill"))]
self.backfill_sync.pause();
SyncState::SyncingFinalized {
@ -430,7 +430,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
}
Some((RangeSyncType::Head, start_slot, target_slot)) => {
// If there is a backfill sync in progress pause it.
#[cfg(not(feature = "disable_backfill"))]
#[cfg(not(feature = "disable-backfill"))]
self.backfill_sync.pause();
SyncState::SyncingHead {