added check for fee recipient per validator and added unit tests (#8454)

Addresses #5403


  - Added `check_fee_recipient()` method to validate individual validators
- Added `check_all_fee_recipients()` to validate all validators on startup
- Validator client now fails to start if any enabled validator lacks a fee recipient and no global flag is used.
- Added Clear error messages to guide users on how to fix the issue
- Added unit tests


Co-Authored-By: AbolareRoheemah <roheemahabo@gmail.com>
This commit is contained in:
Roheemah
2026-04-09 06:43:50 +01:00
committed by GitHub
parent 8681e8e06e
commit 4b297c6ce8
2 changed files with 292 additions and 1 deletions

View File

@@ -187,6 +187,9 @@ impl<E: EthSpec> ProductionValidatorClient<E> {
info!(new_validators, "Completed validator discovery");
}
// Check for all validators' fee recipient
validator_defs.check_all_fee_recipients(config.validator_store.fee_recipient)?;
let validators = InitializedValidators::from_definitions(
validator_defs,
config.validator_dir.clone(),