merge conflicts

This commit is contained in:
Eitan Seri-Levi
2026-04-27 10:10:41 +02:00
3 changed files with 25 additions and 5 deletions

View File

@@ -643,7 +643,7 @@ impl<E: EthSpec> ProductionValidatorClient<E> {
self.payload_attestation_service
.clone()
.start_update_service(&self.context.eth2_config.spec)
.start_update_service()
.map_err(|e| format!("Unable to start payload attestation service: {}", e))?;
self.preparation_service

View File

@@ -7,7 +7,11 @@ use std::sync::Arc;
use task_executor::TaskExecutor;
use tokio::time::sleep;
use tracing::{debug, error, info};
<<<<<<< HEAD
use types::ChainSpec;
=======
use types::{ChainSpec, EthSpec};
>>>>>>> gloas-ptc-validator-duty
use validator_store::ValidatorStore;
pub struct PayloadAttestationServiceBuilder<S: ValidatorStore, T: SlotClock + 'static> {
@@ -19,6 +23,14 @@ pub struct PayloadAttestationServiceBuilder<S: ValidatorStore, T: SlotClock + 's
chain_spec: Option<Arc<ChainSpec>>,
}
impl<S: ValidatorStore + 'static, T: SlotClock + 'static> Default
for PayloadAttestationServiceBuilder<S, T>
{
fn default() -> Self {
Self::new()
}
}
impl<S: ValidatorStore + 'static, T: SlotClock + 'static> PayloadAttestationServiceBuilder<S, T> {
pub fn new() -> Self {
Self {
@@ -117,9 +129,9 @@ impl<S, T> Deref for PayloadAttestationService<S, T> {
}
impl<S: ValidatorStore + 'static, T: SlotClock + 'static> PayloadAttestationService<S, T> {
pub fn start_update_service(self, spec: &ChainSpec) -> Result<(), String> {
let slot_duration = spec.get_slot_duration();
let payload_attestation_due = spec.get_payload_attestation_due();
pub fn start_update_service(self) -> Result<(), String> {
let slot_duration = self.chain_spec.get_slot_duration();
let payload_attestation_due = self.chain_spec.get_payload_attestation_due();
info!(
payload_attestation_due_ms = payload_attestation_due.as_millis(),
@@ -143,6 +155,14 @@ impl<S: ValidatorStore + 'static, T: SlotClock + 'static> PayloadAttestationServ
continue;
};
if !self
.chain_spec
.fork_name_at_slot::<S::E>(current_slot)
.gloas_enabled()
{
continue;
}
let duties = self.duties_service.get_ptc_duties_for_slot(current_slot);
if duties.is_empty() {
continue;