Remove INVALID_TERMINAL_BLOCK (#3385)

## Issue Addressed

Resolves #3379 

## Proposed Changes

Remove instances of `InvalidTerminalBlock` in lighthouse and use 
`Invalid {latest_valid_hash: "0x0000000000000000000000000000000000000000000000000000000000000000"}` 
to represent that status.
This commit is contained in:
Pawan Dhananjay
2022-08-10 07:52:58 +00:00
parent 2de26b20f8
commit c25934956b
7 changed files with 58 additions and 67 deletions

View File

@@ -18,9 +18,6 @@ pub enum PayloadStatus {
InvalidBlockHash {
validation_error: Option<String>,
},
InvalidTerminalBlock {
validation_error: Option<String>,
},
}
/// Processes the response from the execution engine.
@@ -90,22 +87,6 @@ pub fn process_payload_status(
validation_error: response.validation_error.clone(),
})
}
PayloadStatusV1Status::InvalidTerminalBlock => {
// In the interests of being liberal with what we accept, only raise a
// warning here.
if response.latest_valid_hash.is_some() {
warn!(
log,
"Malformed response from execution engine";
"msg" => "expected a null latest_valid_hash",
"status" => ?response.status
)
}
Ok(PayloadStatus::InvalidTerminalBlock {
validation_error: response.validation_error.clone(),
})
}
PayloadStatusV1Status::Syncing => {
// In the interests of being liberal with what we accept, only raise a
// warning here.