feat: relax on new head in validator (#13352)

This commit is contained in:
Matthias Seitz
2024-12-13 14:59:40 +01:00
committed by GitHub
parent bed722b267
commit ed2c69295d
6 changed files with 51 additions and 25 deletions

View File

@ -24,7 +24,7 @@ use alloy_eips::{
};
use reth_chainspec::{ChainSpec, EthereumHardforks};
use reth_primitives::{InvalidTransactionError, SealedBlock};
use reth_primitives_traits::GotExpected;
use reth_primitives_traits::{BlockBody, GotExpected};
use reth_storage_api::{AccountReader, StateProviderFactory};
use reth_tasks::TaskSpawner;
use std::{
@ -106,7 +106,11 @@ where
self.validate_all(transactions)
}
fn on_new_head_block(&self, new_tip_block: &SealedBlock) {
fn on_new_head_block<H, B>(&self, new_tip_block: &SealedBlock<H, B>)
where
H: reth_primitives_traits::BlockHeader,
B: BlockBody,
{
self.inner.on_new_head_block(new_tip_block.header())
}
}