Skip to content

Commit

Permalink
Update 0_beacon-chain.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinDrake authored Apr 30, 2019
1 parent 09ed9ae commit 66403ad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions specs/core/0_beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -1459,8 +1459,7 @@ def get_attestation_deltas(state: BeaconState) -> Tuple[List[Gwei], List[Gwei]]:
for index in get_unslashed_attesting_indices(state, matching_source_attestations):
earliest_attestation = get_earliest_attestation(state, matching_source_attestations, index)
rewards[earliest_attestation.proposer_index] += get_base_reward(state, index) // PROPOSER_REWARD_QUOTIENT
attestation_slot = get_attestation_slot(state, earliest_attestation)
inclusion_delay = earliest_attestation.inclusion_slot - attestation_slot
inclusion_delay = earliest_attestation.inclusion_slot - get_attestation_slot(state, earliest_attestation)
rewards[index] += get_base_reward(state, index) * MIN_ATTESTATION_INCLUSION_DELAY // inclusion_delay

# Inactivity penalty
Expand Down Expand Up @@ -1745,9 +1744,8 @@ def process_attestation(state: BeaconState, attestation: Attestation) -> None:
Process ``Attestation`` operation.
Note that this function mutates ``state``.
"""
attestation_slot = get_attestation_slot(state, attestation)
min_slot = state.slot - SLOTS_PER_EPOCH if get_current_epoch(state) > GENESIS_EPOCH else GENESIS_SLOT
assert min_slot <= attestation_slot <= state.slot - MIN_ATTESTATION_INCLUSION_DELAY
assert min_slot <= get_attestation_slot(state, attestation) <= state.slot - MIN_ATTESTATION_INCLUSION_DELAY

# Check target epoch, source epoch, source root, and source crosslink
data = attestation.data
Expand Down

0 comments on commit 66403ad

Please sign in to comment.