proofs: prefer encode_list over encode_iter (#2518)

This commit is contained in:
Roman Krasiuk
2023-05-02 17:23:45 +03:00
committed by GitHub
parent be87dcc682
commit 423265648d
5 changed files with 12 additions and 7 deletions

View File

@ -182,7 +182,7 @@ pub fn validate_block_standalone(
) -> Result<(), ConsensusError> {
// Check ommers hash
// TODO(onbjerg): This should probably be accessible directly on [Block]
let ommers_hash = reth_primitives::proofs::calculate_ommers_root(block.ommers.iter());
let ommers_hash = reth_primitives::proofs::calculate_ommers_root(&block.ommers);
if block.header.ommers_hash != ommers_hash {
return Err(ConsensusError::BodyOmmersHashDiff {
got: ommers_hash,