From 137a9fd3a7a9ca9342bc699daa804a4ee03eee9d Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Tue, 28 Sep 2021 14:29:20 +1000 Subject: [PATCH] Remove Option from terminal_block_hash in EL --- beacon_node/execution_layer/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beacon_node/execution_layer/src/lib.rs b/beacon_node/execution_layer/src/lib.rs index 87c10f7ec7..1cacda7643 100644 --- a/beacon_node/execution_layer/src/lib.rs +++ b/beacon_node/execution_layer/src/lib.rs @@ -36,7 +36,7 @@ impl From for Error { struct Inner { engines: Engines, terminal_total_difficulty: Uint256, - terminal_block_hash: Option, + terminal_block_hash: Hash256, fee_recipient: Option
, execution_blocks: Mutex>, executor: TaskExecutor, @@ -52,7 +52,7 @@ impl ExecutionLayer { pub fn from_urls( urls: Vec, terminal_total_difficulty: Uint256, - terminal_block_hash: Option, + terminal_block_hash: Hash256, fee_recipient: Option
, executor: TaskExecutor, log: Logger, @@ -98,7 +98,7 @@ impl ExecutionLayer { self.inner.terminal_total_difficulty } - fn terminal_block_hash(&self) -> Option { + fn terminal_block_hash(&self) -> Hash256 { self.inner.terminal_block_hash } @@ -386,7 +386,7 @@ impl ExecutionLayer { } fn is_valid_terminal_pow_block(&self, block: ExecutionBlock, parent: ExecutionBlock) -> bool { - if Some(block.block_hash) == self.terminal_block_hash() { + if block.block_hash == self.terminal_block_hash() { return true; }