feat(primitives): add _HASH suffix for constants hashes (#5175)

This commit is contained in:
Thomas Coratger
2023-10-25 16:07:21 +02:00
committed by GitHub
parent 98e03ee4e2
commit dd6913cd98
13 changed files with 42 additions and 40 deletions

View File

@ -3,7 +3,7 @@ use reth_consensus_common::validation;
use reth_interfaces::consensus::{Consensus, ConsensusError};
use reth_primitives::{
constants::{ALLOWED_FUTURE_BLOCK_TIME_SECONDS, MAXIMUM_EXTRA_DATA_SIZE},
Chain, ChainSpec, Hardfork, Header, SealedBlock, SealedHeader, EMPTY_OMMER_ROOT, U256,
Chain, ChainSpec, Hardfork, Header, SealedBlock, SealedHeader, EMPTY_OMMER_ROOT_HASH, U256,
};
use std::{sync::Arc, time::SystemTime};
@ -55,7 +55,7 @@ impl Consensus for BeaconConsensus {
return Err(ConsensusError::TheMergeNonceIsNotZero)
}
if header.ommers_hash != EMPTY_OMMER_ROOT {
if header.ommers_hash != EMPTY_OMMER_ROOT_HASH {
return Err(ConsensusError::TheMergeOmmerRootIsNotEmpty)
}