mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-15 09:48:20 +00:00
Fix payload attestation service using stale slot after sleep
This commit is contained in:
@@ -101,10 +101,15 @@ impl<S: ValidatorStore + 'static, T: SlotClock + 'static> PayloadAttestationServ
|
||||
|
||||
sleep(duration_to_next_slot + payload_attestation_due).await;
|
||||
|
||||
let Some(attestation_slot) = self.slot_clock.now() else {
|
||||
error!("Failed to read slot clock after sleep");
|
||||
continue;
|
||||
};
|
||||
|
||||
let service = self.clone();
|
||||
self.executor.spawn(
|
||||
async move {
|
||||
service.produce_and_publish(current_slot).await;
|
||||
service.produce_and_publish(attestation_slot).await;
|
||||
},
|
||||
"payload_attestation_producer",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user