Skip to content

Commit

Permalink
Merge pull request #2396 from terencechain/patch-117
Browse files Browse the repository at this point in the history
Shard fees: `adjustment_quotient` to use `previous_epoch`
  • Loading branch information
djrtwo authored May 10, 2021
2 parents 2539d4e + e38f758 commit d239b7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions specs/sharding/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -714,11 +714,11 @@ def process_pending_headers(state: BeaconState) -> None:
```python
def charge_confirmed_header_fees(state: BeaconState) -> None:
new_gasprice = state.shard_gasprice
previous_epoch = get_previous_epoch(state)
adjustment_quotient = (
get_active_shard_count(state, get_current_epoch(state))
get_active_shard_count(state, previous_epoch)
* SLOTS_PER_EPOCH * GASPRICE_ADJUSTMENT_COEFFICIENT
)
previous_epoch = get_previous_epoch(state)
previous_epoch_start_slot = compute_start_slot_at_epoch(previous_epoch)
for slot in range(previous_epoch_start_slot, previous_epoch_start_slot + SLOTS_PER_EPOCH):
for shard_index in range(get_active_shard_count(state, previous_epoch)):
Expand Down

0 comments on commit d239b7a

Please sign in to comment.