Fix bug with total_balance in epoch processing

This commit is contained in:
Paul Hauner 2019-02-16 15:08:57 +11:00
parent b0513b1ec1
commit c5158e2974
No known key found for this signature in database
GPG Key ID: D362883A9218FCC6

View File

@ -144,8 +144,10 @@ impl EpochProcessable for BeaconState {
let previous_epoch_attester_indices =
self.get_attestation_participants_union(&previous_epoch_attestations[..], spec)?;
let previous_total_balance =
self.get_total_balance(&previous_epoch_attester_indices[..], spec);
let previous_total_balance = self.get_total_balance(
&get_active_validator_indices(&self.validator_registry, previous_epoch),
spec,
);
/*
* Validators targetting the previous justified slot