mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 13:58:28 +00:00
Use AttestationDuty in epoch duties
This commit is contained in:
@@ -23,9 +23,7 @@ pub struct WorkInfo {
|
||||
#[derive(Debug, PartialEq, Clone, Copy, Default)]
|
||||
pub struct EpochDuty {
|
||||
pub block_production_slot: Option<Slot>,
|
||||
pub attestation_slot: Slot,
|
||||
pub attestation_shard: u64,
|
||||
pub committee_index: u64,
|
||||
pub attestation_duty: AttestationDuty,
|
||||
}
|
||||
|
||||
impl EpochDuty {
|
||||
@@ -39,12 +37,8 @@ impl EpochDuty {
|
||||
|
||||
// if the validator is required to attest to a shard, create the data
|
||||
let mut attestation_duty = None;
|
||||
if self.attestation_slot == slot {
|
||||
attestation_duty = Some(AttestationDuty {
|
||||
slot,
|
||||
shard: self.attestation_shard,
|
||||
committee_index: self.committee_index as usize,
|
||||
});
|
||||
if self.attestation_duty.slot == slot {
|
||||
attestation_duty = self.attestation_duty
|
||||
}
|
||||
|
||||
if produce_block | attestation_duty.is_some() {
|
||||
|
||||
Reference in New Issue
Block a user