mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 12:11:59 +00:00
Implement engine API v1.0.0-alpha.4 (#2810)
* Added ForkchoiceUpdatedV1 & GetPayloadV1 * Added ExecutePayloadV1 * Added new geth test vectors * Separated Json Object/Serialization Code into file * Deleted code/tests for Requests Removed from spec * Finally fixed serialization of null '0x' * Made Naming of JSON Structs Consistent * Fix clippy lints * Remove u64 payload id * Remove unused serde impls * Swap to [u8; 8] for payload id * Tidy * Adjust some block gen return vals * Tidy * Add fallback when payload id is unknown * Remove comment Co-authored-by: Mark Mackey <mark@sigmaprime.io>
This commit is contained in:
@@ -40,6 +40,15 @@ impl ExecutionStatus {
|
||||
pub fn irrelevant() -> Self {
|
||||
ExecutionStatus::Irrelevant(false)
|
||||
}
|
||||
|
||||
pub fn block_hash(&self) -> Option<Hash256> {
|
||||
match self {
|
||||
ExecutionStatus::Valid(hash)
|
||||
| ExecutionStatus::Invalid(hash)
|
||||
| ExecutionStatus::Unknown(hash) => Some(*hash),
|
||||
ExecutionStatus::Irrelevant(_) => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A block that is to be applied to the fork choice.
|
||||
|
||||
Reference in New Issue
Block a user