Skip to content

Commit

Permalink
Remove total_difficulty presence validation from Eth1Block.
Browse files Browse the repository at this point in the history
Total difficulty is no longer relevant: see ethereum/execution-apis#570
  • Loading branch information
povi committed Oct 28, 2024
1 parent a9f499c commit 6d50ac1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions eth1_api/src/eth1_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ enum Error {
MissingNumber {
block: Block<ExecutionTransactionHash>,
},
#[error("RPC returned block without total difficulty: {block:?}")]
MissingTotalDifficulty {
block: Block<ExecutionTransactionHash>,
},
}

#[derive(Default, Debug, Ssz)]
Expand Down Expand Up @@ -69,7 +65,7 @@ impl TryFrom<Block<ExecutionTransactionHash>> for Eth1Block {

let total_difficulty = match total_difficulty {
Some(total_difficulty) => total_difficulty.into(),
None => bail!(Error::MissingTotalDifficulty { block }),
None => Difficulty::ZERO,
};

Ok(Self {
Expand Down

0 comments on commit 6d50ac1

Please sign in to comment.