Rename fields in validator client EpochDuties

This commit is contained in:
Age Manning 2019-03-27 21:36:06 +11:00
parent 086ebb1485
commit a315e9da49
No known key found for this signature in database
GPG Key ID: 05EED64B79E06A93
2 changed files with 5 additions and 5 deletions

View File

@ -17,8 +17,8 @@ pub struct WorkType {
#[derive(Debug, PartialEq, Clone, Copy, Default)] #[derive(Debug, PartialEq, Clone, Copy, Default)]
pub struct EpochDuty { pub struct EpochDuty {
pub block_production_slot: Option<Slot>, pub block_production_slot: Option<Slot>,
pub committee_slot: Slot, pub attestation_slot: Slot,
pub committee_shard: u64, pub attestation_shard: u64,
pub committee_index: u64, pub committee_index: u64,
} }
@ -32,7 +32,7 @@ impl EpochDuty {
}; };
let mut produce_attestation = false; let mut produce_attestation = false;
if self.committee_slot == slot { if self.attestation_slot == slot {
produce_attestation = true; produce_attestation = true;
} }

View File

@ -44,8 +44,8 @@ impl BeaconNode for ValidatorServiceClient {
}; };
let epoch_duty = EpochDuty { let epoch_duty = EpochDuty {
block_production_slot, block_production_slot,
committee_slot: Slot::from(active_duty.get_committee_slot()), attestation_slot: Slot::from(active_duty.get_attestation_slot()),
committee_shard: active_duty.get_committee_shard(), attestation_shard: active_duty.get_attestation_shard(),
committee_index: active_duty.get_committee_index(), committee_index: active_duty.get_committee_index(),
}; };
epoch_duties.insert(pubkeys[index].clone(), Some(epoch_duty)); epoch_duties.insert(pubkeys[index].clone(), Some(epoch_duty));