mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 21:27:12 +00:00
merge unstable
This commit is contained in:
@@ -143,11 +143,18 @@ pub struct ExecutionBlock {
|
||||
pub block_number: u64,
|
||||
|
||||
pub parent_hash: ExecutionBlockHash,
|
||||
pub total_difficulty: Uint256,
|
||||
pub total_difficulty: Option<Uint256>,
|
||||
#[serde(with = "serde_utils::u64_hex_be")]
|
||||
pub timestamp: u64,
|
||||
}
|
||||
|
||||
impl ExecutionBlock {
|
||||
pub fn terminal_total_difficulty_reached(&self, terminal_total_difficulty: Uint256) -> bool {
|
||||
self.total_difficulty
|
||||
.is_none_or(|td| td >= terminal_total_difficulty)
|
||||
}
|
||||
}
|
||||
|
||||
#[superstruct(
|
||||
variants(V1, V2, V3),
|
||||
variant_attributes(derive(Clone, Debug, Eq, Hash, PartialEq),),
|
||||
|
||||
Reference in New Issue
Block a user