Skip to content

Commit e40b9a6

Browse files
Remove total_difficulty presence validation from Eth1Block.
Total difficulty is no longer relevant: see ethereum/execution-apis#570
1 parent ccf1f60 commit e40b9a6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

eth1_api/src/eth1_block.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ enum Error {
2626
MissingNumber {
2727
block: Block<ExecutionTransactionHash>,
2828
},
29-
#[error("RPC returned block without total difficulty: {block:?}")]
30-
MissingTotalDifficulty {
31-
block: Block<ExecutionTransactionHash>,
32-
},
3329
}
3430

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

7066
let total_difficulty = match total_difficulty {
7167
Some(total_difficulty) => total_difficulty.into(),
72-
None => bail!(Error::MissingTotalDifficulty { block }),
68+
None => Difficulty::ZERO,
7369
};
7470

7571
Ok(Self {

0 commit comments

Comments
 (0)