chore(consensus): Clear up the naming and intention behind checks (#2415)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
rakita
2023-04-26 18:04:36 +02:00
committed by GitHub
parent 57a19f91f0
commit 837555e296
10 changed files with 59 additions and 28 deletions

View File

@ -50,7 +50,11 @@ impl AutoSealConsensus {
}
impl Consensus for AutoSealConsensus {
fn pre_validate_header(
fn validate_header(&self, _header: &SealedHeader) -> Result<(), ConsensusError> {
Ok(())
}
fn validate_header_agains_parent(
&self,
_header: &SealedHeader,
_parent: &SealedHeader,
@ -58,7 +62,7 @@ impl Consensus for AutoSealConsensus {
Ok(())
}
fn validate_header(
fn validate_header_with_total_difficulty(
&self,
_header: &Header,
_total_difficulty: U256,
@ -66,7 +70,7 @@ impl Consensus for AutoSealConsensus {
Ok(())
}
fn pre_validate_block(&self, _block: &SealedBlock) -> Result<(), ConsensusError> {
fn validate_block(&self, _block: &SealedBlock) -> Result<(), ConsensusError> {
Ok(())
}
}