Fix typing

This commit is contained in:
Hsiao-Wei Wang
2020-05-15 21:49:17 +08:00
parent 2bf020d49d
commit 88d7315739
2 changed files with 3 additions and 3 deletions

View File

@@ -1476,12 +1476,12 @@ def get_attestation_deltas(state: BeaconState) -> Tuple[Sequence[Gwei], Sequence
_, inactivity_penalties = get_inactivity_penalty_deltas(state)
rewards = [
source_rewards[i] + target_rewards[i] + head_rewards[i] + inclusion_delay_rewards[i]
Gwei(source_rewards[i] + target_rewards[i] + head_rewards[i] + inclusion_delay_rewards[i])
for i in range(len(state.validators))
]
penalties = [
source_penalties[i] + target_penalties[i] + head_penalties[i] + inactivity_penalties[i]
Gwei(source_penalties[i] + target_penalties[i] + head_penalties[i] + inactivity_penalties[i])
for i in range(len(state.validators))
]

View File

@@ -430,7 +430,7 @@ def compute_subnet_for_attestation(state: BeaconState, attestation: Attestation)
slots_since_epoch_start = attestation.data.slot % SLOTS_PER_EPOCH
committees_since_epoch_start = get_committee_count_at_slot(state, attestation.data.slot) * slots_since_epoch_start
return (committees_since_epoch_start + attestation.data.index) % ATTESTATION_SUBNET_COUNT
return uint64((committees_since_epoch_start + attestation.data.index) % ATTESTATION_SUBNET_COUNT)
```
### Attestation aggregation