mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 01:05:47 +00:00
Fix test_03: update weight assertions for spec-parity boost
Proposer boost is no longer baked into node.weight() — it is applied on-the-fly in the walk's get_weight via is_supporting_vote. Update the expected weights in test_03 to reflect pure attestation scores.
This commit is contained in:
@@ -1053,13 +1053,15 @@ pub fn get_execution_status_test_definition_03() -> ForkChoiceTestDefinition {
|
|||||||
proposer_boost_root: get_root(3),
|
proposer_boost_root: get_root(3),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Stored weights are pure attestation scores (proposer boost is applied
|
||||||
|
// on-the-fly in the walk's `get_weight`, not baked into `node.weight()`).
|
||||||
ops.push(Operation::AssertWeight {
|
ops.push(Operation::AssertWeight {
|
||||||
block_root: get_root(0),
|
block_root: get_root(0),
|
||||||
weight: 33_250,
|
weight: 2_000,
|
||||||
});
|
});
|
||||||
ops.push(Operation::AssertWeight {
|
ops.push(Operation::AssertWeight {
|
||||||
block_root: get_root(1),
|
block_root: get_root(1),
|
||||||
weight: 33_250,
|
weight: 2_000,
|
||||||
});
|
});
|
||||||
ops.push(Operation::AssertWeight {
|
ops.push(Operation::AssertWeight {
|
||||||
block_root: get_root(2),
|
block_root: get_root(2),
|
||||||
@@ -1067,8 +1069,7 @@ pub fn get_execution_status_test_definition_03() -> ForkChoiceTestDefinition {
|
|||||||
});
|
});
|
||||||
ops.push(Operation::AssertWeight {
|
ops.push(Operation::AssertWeight {
|
||||||
block_root: get_root(3),
|
block_root: get_root(3),
|
||||||
// This is a "magic number" generated from `calculate_committee_fraction`.
|
weight: 0,
|
||||||
weight: 31_250,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Invalidate the payload of 3.
|
// Invalidate the payload of 3.
|
||||||
|
|||||||
Reference in New Issue
Block a user