use integer division (//) instead of non-integer (/)
This commit is contained in:
parent
7a46181853
commit
104b83aab3
|
@ -69,9 +69,9 @@ def compute_weak_subjectivity_period(state: BeaconState) -> uint64:
|
||||||
weak_subjectivity_period = MIN_VALIDATOR_WITHDRAWABILITY_DELAY
|
weak_subjectivity_period = MIN_VALIDATOR_WITHDRAWABILITY_DELAY
|
||||||
validator_count = len(get_active_validator_indices(state, get_current_epoch(state)))
|
validator_count = len(get_active_validator_indices(state, get_current_epoch(state)))
|
||||||
if validator_count >= MIN_PER_EPOCH_CHURN_LIMIT * CHURN_LIMIT_QUOTIENT:
|
if validator_count >= MIN_PER_EPOCH_CHURN_LIMIT * CHURN_LIMIT_QUOTIENT:
|
||||||
weak_subjectivity_period += SAFETY_DECAY * CHURN_LIMIT_QUOTIENT / (2 * 100)
|
weak_subjectivity_period += SAFETY_DECAY * CHURN_LIMIT_QUOTIENT // (2 * 100)
|
||||||
else:
|
else:
|
||||||
weak_subjectivity_period += SAFETY_DECAY * validator_count / (2 * 100 * MIN_PER_EPOCH_CHURN_LIMIT)
|
weak_subjectivity_period += SAFETY_DECAY * validator_count // (2 * 100 * MIN_PER_EPOCH_CHURN_LIMIT)
|
||||||
return weak_subjectivity_period
|
return weak_subjectivity_period
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue