diff --git a/ledger/src/blockstore_processor.rs b/ledger/src/blockstore_processor.rs index b29b3182b9..8ea7634776 100644 --- a/ledger/src/blockstore_processor.rs +++ b/ledger/src/blockstore_processor.rs @@ -323,16 +323,14 @@ pub fn process_blockstore_from_root( let hard_forks = bank.hard_forks(); for hard_fork_slot in new_hard_forks.iter() { - // Ensure the user isn't trying to add new hard forks for a slot that's earlier than the current - // root slot. Doing so won't cause any effect so emit an error - if *hard_fork_slot < start_slot { - error!( - "Unable to add new hard fork at {}, it must be greater than slot {}", - hard_fork_slot, start_slot + if *hard_fork_slot > start_slot { + hard_forks.write().unwrap().register(*hard_fork_slot); + } else { + warn!( + "Hard fork at {} ignored, --hard-fork option can be removed.", + hard_fork_slot ); - return Err(BlockstoreProcessorError::InvalidHardFork(*hard_fork_slot)); } - hard_forks.write().unwrap().register(*hard_fork_slot); } }