Skip to content

Commit

Permalink
Merge pull request #1213 from ethereum/ralexstokes-patch-2
Browse files Browse the repository at this point in the history
Clarify comment on phase 0 transfers
  • Loading branch information
djrtwo authored Jun 24, 2019
2 parents b007d5a + 82167ff commit b558198
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion specs/core/0_beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -1807,10 +1807,13 @@ def process_transfer(state: BeaconState, transfer: Transfer) -> None:
assert state.balances[transfer.sender] >= max(transfer.amount, transfer.fee)
# A transfer is valid in only one slot
assert state.slot == transfer.slot
# Sender must be not yet eligible for activation, withdrawn, or transfer balance over MAX_EFFECTIVE_BALANCE
# Sender must satisfy at least one of the following conditions in the parenthesis:
assert (
# * Has not been activated
state.validators[transfer.sender].activation_eligibility_epoch == FAR_FUTURE_EPOCH or
# * Is withdrawable
get_current_epoch(state) >= state.validators[transfer.sender].withdrawable_epoch or
# * Balance after transfer is more than the effective balance threshold
transfer.amount + transfer.fee + MAX_EFFECTIVE_BALANCE <= state.balances[transfer.sender]
)
# Verify that the pubkey is valid
Expand Down

0 comments on commit b558198

Please sign in to comment.