mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
simplify calculate_committee_fraction (#4213)
## Issue Addressed [#4211](https://github.com/sigp/lighthouse/issues/4211) ## Proposed Changes This PR conforms the helper function `calculate_committee_fraction` to the [v1.3.0 spec](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/fork-choice.md#get_weight) ## Additional Info the old definition of `calculate_committee_fraction` is almost identical, but the new definition is simpler.
This commit is contained in:
@@ -987,11 +987,11 @@ pub fn get_execution_status_test_definition_03() -> ForkChoiceTestDefinition {
|
||||
|
||||
ops.push(Operation::AssertWeight {
|
||||
block_root: get_root(0),
|
||||
weight: 33_000,
|
||||
weight: 33_250,
|
||||
});
|
||||
ops.push(Operation::AssertWeight {
|
||||
block_root: get_root(1),
|
||||
weight: 33_000,
|
||||
weight: 33_250,
|
||||
});
|
||||
ops.push(Operation::AssertWeight {
|
||||
block_root: get_root(2),
|
||||
@@ -1000,7 +1000,7 @@ pub fn get_execution_status_test_definition_03() -> ForkChoiceTestDefinition {
|
||||
ops.push(Operation::AssertWeight {
|
||||
block_root: get_root(3),
|
||||
// This is a "magic number" generated from `calculate_committee_fraction`.
|
||||
weight: 31_000,
|
||||
weight: 31_250,
|
||||
});
|
||||
|
||||
// Invalidate the payload of 3.
|
||||
|
||||
Reference in New Issue
Block a user