chore: phase out ethers rpc block types (#1463)

This commit is contained in:
Matthias Seitz
2023-02-20 16:02:33 +01:00
committed by GitHub
parent 2a9472e9c3
commit 50203a8f2a
22 changed files with 119 additions and 95 deletions

View File

@ -7,7 +7,6 @@ use reth_executor::{
use reth_interfaces::consensus::ForkchoiceState;
use reth_primitives::{
proofs::{self, EMPTY_LIST_HASH},
rpc::{BlockId, H256 as EthersH256},
ChainSpec, Hardfork, Header, SealedBlock, TransactionSigned, H64, U256,
};
use reth_provider::{BlockProvider, HeaderProvider, StateProvider};
@ -158,7 +157,7 @@ impl<Client: HeaderProvider + BlockProvider + StateProvider> EngineApi<Client> {
return Ok(PayloadStatus::new(PayloadStatusEnum::Valid, block_hash))
}
let Some(parent) = self.client.block(BlockId::Hash(EthersH256(parent_hash.0)))? else {
let Some(parent) = self.client.block_by_hash(parent_hash)? else {
// TODO: cache block for storing later
return Ok(PayloadStatus::from_status(PayloadStatusEnum::Syncing))
};