mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: Ingest highest_precompile_address
This commit is contained in:
@ -12,7 +12,7 @@ use alloy_rpc_types::engine::{
|
||||
use jsonrpsee::http_client::{transport::HttpBackend, HttpClient};
|
||||
use reth::network::PeersHandleProvider;
|
||||
use reth_chainspec::{EthChainSpec, EthereumHardforks};
|
||||
use reth_hyperliquid_types::PrecompilesCache;
|
||||
use reth_hyperliquid_types::{PrecompileData, PrecompilesCache};
|
||||
use reth_node_api::{Block, FullNodeComponents, PayloadTypes};
|
||||
use reth_node_builder::EngineTypes;
|
||||
use reth_node_builder::NodeTypesWithEngine;
|
||||
@ -191,7 +191,10 @@ impl BlockIngest {
|
||||
let mut u_cache = cache.lock().await;
|
||||
let mut u_pre_cache = precompiles_cache.lock();
|
||||
for blk in new_blocks {
|
||||
let precompiles = blk.read_precompile_calls.clone();
|
||||
let precompiles = PrecompileData {
|
||||
precompiles: blk.read_precompile_calls.clone(),
|
||||
highest_precompile_address: blk.highest_precompile_address,
|
||||
};
|
||||
let h = match &blk.block {
|
||||
EvmBlock::Reth115(b) => {
|
||||
let block_number = b.header().number() as u64;
|
||||
|
||||
@ -11,6 +11,7 @@ pub(crate) struct BlockAndReceipts {
|
||||
pub system_txs: Vec<SystemTx>,
|
||||
#[serde(default)]
|
||||
pub read_precompile_calls: Vec<(Address, Vec<(ReadPrecompileInput, ReadPrecompileResult)>)>,
|
||||
pub highest_precompile_address: Option<Address>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user