mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
fix(rpc): apply blockhashes update in witness RPC (#10419)
This commit is contained in:
@@ -10,7 +10,7 @@ use reth_provider::{
|
||||
BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, HeaderProvider, StateProofProvider,
|
||||
StateProviderFactory, TransactionVariant,
|
||||
};
|
||||
use reth_revm::database::StateProviderDatabase;
|
||||
use reth_revm::{database::StateProviderDatabase, state_change::apply_blockhashes_update};
|
||||
use reth_rpc_api::DebugApiServer;
|
||||
use reth_rpc_eth_api::{
|
||||
helpers::{Call, EthApiSpec, EthTransactions, TraceExt},
|
||||
@@ -589,6 +589,16 @@ where
|
||||
)
|
||||
.map_err(|err| EthApiError::Internal(err.into()))?;
|
||||
|
||||
// apply eip-2935 blockhashes update
|
||||
apply_blockhashes_update(
|
||||
&mut db,
|
||||
&this.inner.provider.chain_spec(),
|
||||
block.timestamp,
|
||||
block.number,
|
||||
block.parent_hash,
|
||||
)
|
||||
.map_err(|err| EthApiError::Internal(err.into()))?;
|
||||
|
||||
// Re-execute all of the transactions in the block to load all touched accounts into
|
||||
// the cache DB.
|
||||
for tx in block.raw_transactions() {
|
||||
|
||||
Reference in New Issue
Block a user