Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
remove explicit casting
Browse files Browse the repository at this point in the history
  • Loading branch information
decanus committed Feb 26, 2019
1 parent 28a6316 commit d2004d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/BeaconChain/StateTransition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ extension StateTransition {
return BeaconChain.getAttestationParticipants(state: state, attestationData: $0.data, bitfield: $0.aggregationBitfield)
}

let currentEpochBoundaryAttestingBalance = (currentEpochBoundaryAttesterIndices as [ValidatorIndex]).totalBalance(state: state)
let currentEpochBoundaryAttestingBalance = currentEpochBoundaryAttesterIndices.totalBalance(state: state)

let previousTotalBalance = state.validatorRegistry.activeIndices(epoch: previousEpoch).totalBalance(state: state)

Expand All @@ -357,7 +357,7 @@ extension StateTransition {
return BeaconChain.getAttestationParticipants(state: state, attestationData: $0.data, bitfield: $0.aggregationBitfield)
}

let previousEpochBoundaryAttestingBalance = (previousEpochBoundaryAttesterIndices as [ValidatorIndex]).totalBalance(state: state)
let previousEpochBoundaryAttestingBalance = previousEpochBoundaryAttesterIndices.totalBalance(state: state)

let previousEpochHeadAttestations = previousEpochAttestations.filter {
$0.data.beaconBlockRoot == BeaconChain.getBlockRoot(state: state, slot: $0.data.slot)
Expand All @@ -367,7 +367,7 @@ extension StateTransition {
return BeaconChain.getAttestationParticipants(state: state, attestationData: $0.data, bitfield: $0.aggregationBitfield)
}

let previousEpochHeadAttestingBalance = (previousEpochHeadAttesterIndices as [ValidatorIndex]).totalBalance(state: state)
let previousEpochHeadAttestingBalance = previousEpochHeadAttesterIndices.totalBalance(state: state)

eth1data(state: &state, nextEpoch: nextEpoch)

Expand Down

0 comments on commit d2004d2

Please sign in to comment.