mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 09:16:00 +00:00
Rename fork choice test def for clarity
This commit is contained in:
@@ -98,7 +98,7 @@ pub enum Operation {
|
|||||||
},
|
},
|
||||||
/// Simulate receiving and validating an execution payload for `block_root`.
|
/// Simulate receiving and validating an execution payload for `block_root`.
|
||||||
/// Sets `payload_received = true` on the V29 node via the live validation path.
|
/// Sets `payload_received = true` on the V29 node via the live validation path.
|
||||||
ProcessExecutionPayload {
|
ProcessExecutionPayloadEnvelope {
|
||||||
block_root: Hash256,
|
block_root: Hash256,
|
||||||
},
|
},
|
||||||
AssertPayloadReceived {
|
AssertPayloadReceived {
|
||||||
@@ -500,7 +500,7 @@ impl ForkChoiceTestDefinition {
|
|||||||
// the payload to be in payload_states (payload_received).
|
// the payload to be in payload_states (payload_received).
|
||||||
node_v29.payload_received = is_timely || is_data_available;
|
node_v29.payload_received = is_timely || is_data_available;
|
||||||
}
|
}
|
||||||
Operation::ProcessExecutionPayload { block_root } => {
|
Operation::ProcessExecutionPayloadEnvelope { block_root } => {
|
||||||
fork_choice
|
fork_choice
|
||||||
.on_valid_payload_envelope_received(block_root)
|
.on_valid_payload_envelope_received(block_root)
|
||||||
.unwrap_or_else(|e| {
|
.unwrap_or_else(|e| {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ pub fn get_gloas_chain_following_test_definition() -> ForkChoiceTestDefinition {
|
|||||||
|
|
||||||
// Mark root_1 as having received its execution payload so that
|
// Mark root_1 as having received its execution payload so that
|
||||||
// its FULL virtual node exists in the Gloas fork choice tree.
|
// its FULL virtual node exists in the Gloas fork choice tree.
|
||||||
ops.push(Operation::ProcessExecutionPayload {
|
ops.push(Operation::ProcessExecutionPayloadEnvelope {
|
||||||
block_root: get_root(1),
|
block_root: get_root(1),
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@ pub fn get_gloas_find_head_vote_transition_test_definition() -> ForkChoiceTestDe
|
|||||||
|
|
||||||
// Mark root_1 as having received its execution payload so that
|
// Mark root_1 as having received its execution payload so that
|
||||||
// its FULL virtual node exists in the Gloas fork choice tree.
|
// its FULL virtual node exists in the Gloas fork choice tree.
|
||||||
ops.push(Operation::ProcessExecutionPayload {
|
ops.push(Operation::ProcessExecutionPayloadEnvelope {
|
||||||
block_root: get_root(1),
|
block_root: get_root(1),
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -368,7 +368,7 @@ pub fn get_gloas_weight_priority_over_payload_preference_test_definition()
|
|||||||
|
|
||||||
// Mark root_1 as having received its execution payload so that
|
// Mark root_1 as having received its execution payload so that
|
||||||
// its FULL virtual node exists in the Gloas fork choice tree.
|
// its FULL virtual node exists in the Gloas fork choice tree.
|
||||||
ops.push(Operation::ProcessExecutionPayload {
|
ops.push(Operation::ProcessExecutionPayloadEnvelope {
|
||||||
block_root: get_root(1),
|
block_root: get_root(1),
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -538,7 +538,7 @@ pub fn get_gloas_interleaved_attestations_test_definition() -> ForkChoiceTestDef
|
|||||||
|
|
||||||
// Mark root_1 as having received its execution payload so that
|
// Mark root_1 as having received its execution payload so that
|
||||||
// its FULL virtual node exists in the Gloas fork choice tree.
|
// its FULL virtual node exists in the Gloas fork choice tree.
|
||||||
ops.push(Operation::ProcessExecutionPayload {
|
ops.push(Operation::ProcessExecutionPayloadEnvelope {
|
||||||
block_root: get_root(1),
|
block_root: get_root(1),
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -674,8 +674,8 @@ pub fn get_gloas_payload_received_interleaving_test_definition() -> ForkChoiceTe
|
|||||||
expected_payload_status: None,
|
expected_payload_status: None,
|
||||||
});
|
});
|
||||||
|
|
||||||
// ProcessExecutionPayload on genesis is a no-op (already received at init).
|
// ProcessExecutionPayloadEnvelope on genesis is a no-op (already received at init).
|
||||||
ops.push(Operation::ProcessExecutionPayload {
|
ops.push(Operation::ProcessExecutionPayloadEnvelope {
|
||||||
block_root: get_root(0),
|
block_root: get_root(0),
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -778,7 +778,7 @@ mod tests {
|
|||||||
|
|
||||||
// Mark root 2's execution payload as received so the Full virtual child exists.
|
// Mark root 2's execution payload as received so the Full virtual child exists.
|
||||||
if first_gloas_block_full {
|
if first_gloas_block_full {
|
||||||
ops.push(Operation::ProcessExecutionPayload {
|
ops.push(Operation::ProcessExecutionPayloadEnvelope {
|
||||||
block_root: get_root(2),
|
block_root: get_root(2),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user