mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 00:42:42 +00:00
Fix test review issues
- Remove wrong latest_message assertions from payload attestation test (on_payload_attestation writes to PTC bitfields, not vote tracker) - Fix corrupted comment: "votes.gloas_enabled() to the genesis block" → "votes to the genesis block" - Fix http_api test fallback string: "n/a" → "irrelevant" to match production code - Add issue link to #[ignore] test - Add comment explaining head_payload_status as u8 cast
This commit is contained in:
@@ -1285,7 +1285,7 @@ where
|
||||
// 2. Ignore all attestations to the zero hash.
|
||||
//
|
||||
// (1) becomes weird once we hit finality and fork choice drops the genesis block. (2) is
|
||||
// fine because votes.gloas_enabled() to the genesis block are not useful; all validators implicitly attest
|
||||
// fine because votes to the genesis block are not useful; all validators implicitly attest
|
||||
// to genesis just by being present in the chain.
|
||||
if attestation.data().beacon_block_root == Hash256::zero() {
|
||||
return Ok(());
|
||||
|
||||
@@ -172,7 +172,8 @@ impl ForkChoiceTest {
|
||||
self
|
||||
}
|
||||
|
||||
/// Inspect the queued payload attestations in fork choice.
|
||||
// TODO(gloas): add inspect_queued_payload_attestations when payload
|
||||
// attestation queueing tests are implemented.
|
||||
#[allow(dead_code)]
|
||||
pub fn inspect_queued_payload_attestations<F>(self, mut func: F) -> Self
|
||||
where
|
||||
@@ -971,6 +972,8 @@ async fn invalid_attestation_future_block() {
|
||||
/// `validate_on_attestation`, which requires a block to exist at a GLOAS-enabled slot.
|
||||
/// Currently the mock execution layer cannot produce Gloas blocks (no
|
||||
/// `signed_execution_payload_bid` support).
|
||||
/// TODO(gloas): un-ignore once mock EL supports Gloas blocks.
|
||||
/// https://github.com/sigp/lighthouse/issues/9025
|
||||
#[ignore]
|
||||
#[tokio::test]
|
||||
async fn invalid_attestation_payload_during_same_slot() {
|
||||
@@ -1045,14 +1048,6 @@ async fn payload_attestation_for_previous_slot_is_accepted_at_next_slot() {
|
||||
"payload attestation at slot S should be accepted at S+1, got: {:?}",
|
||||
result
|
||||
);
|
||||
|
||||
let latest_message = chain
|
||||
.canonical_head
|
||||
.fork_choice_read_lock()
|
||||
.latest_message(0)
|
||||
.expect("latest message should exist");
|
||||
assert_eq!(latest_message.slot, current_slot);
|
||||
assert!(latest_message.payload_present);
|
||||
}
|
||||
|
||||
/// Gossip payload attestations must be for the current slot. A payload attestation for slot S
|
||||
|
||||
Reference in New Issue
Block a user