Merge pull request #3676 from ethDreamer/balance_churn_limit
EIP-7251: Rename get_churn_limit() for clarity
This commit is contained in:
commit
3b259b6a9f
|
@ -51,7 +51,7 @@
|
||||||
- [`get_committee_indices`](#get_committee_indices)
|
- [`get_committee_indices`](#get_committee_indices)
|
||||||
- [`get_validator_max_effective_balance`](#get_validator_max_effective_balance)
|
- [`get_validator_max_effective_balance`](#get_validator_max_effective_balance)
|
||||||
- [Beacon state accessors](#beacon-state-accessors)
|
- [Beacon state accessors](#beacon-state-accessors)
|
||||||
- [New `get_churn_limit`](#new-get_churn_limit)
|
- [New `get_balance_churn_limit`](#new-get_balance_churn_limit)
|
||||||
- [New `get_activation_exit_churn_limit`](#new-get_activation_exit_churn_limit)
|
- [New `get_activation_exit_churn_limit`](#new-get_activation_exit_churn_limit)
|
||||||
- [New `get_consolidation_churn_limit`](#new-get_consolidation_churn_limit)
|
- [New `get_consolidation_churn_limit`](#new-get_consolidation_churn_limit)
|
||||||
- [New `get_active_balance`](#new-get_active_balance)
|
- [New `get_active_balance`](#new-get_active_balance)
|
||||||
|
@ -525,10 +525,10 @@ def get_validator_max_effective_balance(validator: Validator) -> Gwei:
|
||||||
|
|
||||||
### Beacon state accessors
|
### Beacon state accessors
|
||||||
|
|
||||||
#### New `get_churn_limit`
|
#### New `get_balance_churn_limit`
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def get_churn_limit(state: BeaconState) -> Gwei:
|
def get_balance_churn_limit(state: BeaconState) -> Gwei:
|
||||||
"""
|
"""
|
||||||
Return the churn limit for the current epoch.
|
Return the churn limit for the current epoch.
|
||||||
"""
|
"""
|
||||||
|
@ -546,14 +546,14 @@ def get_activation_exit_churn_limit(state: BeaconState) -> Gwei:
|
||||||
"""
|
"""
|
||||||
Return the churn limit for the current epoch dedicated to activations and exits.
|
Return the churn limit for the current epoch dedicated to activations and exits.
|
||||||
"""
|
"""
|
||||||
return min(MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT, get_churn_limit(state))
|
return min(MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT, get_balance_churn_limit(state))
|
||||||
```
|
```
|
||||||
|
|
||||||
#### New `get_consolidation_churn_limit`
|
#### New `get_consolidation_churn_limit`
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def get_consolidation_churn_limit(state: BeaconState) -> Gwei:
|
def get_consolidation_churn_limit(state: BeaconState) -> Gwei:
|
||||||
return get_churn_limit(state) - get_activation_exit_churn_limit(state)
|
return get_balance_churn_limit(state) - get_activation_exit_churn_limit(state)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### New `get_active_balance`
|
#### New `get_active_balance`
|
||||||
|
|
Loading…
Reference in New Issue