mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 02:49:55 +00:00
feat: Support testnet sync
- Add testnet S3 bucket - Use testnet RPC properly - Use testnet chainspec on pseudo peer
This commit is contained in:
@ -245,7 +245,7 @@ where
|
||||
|
||||
ctx.task_executor().spawn_critical("pseudo peer", async move {
|
||||
let block_source =
|
||||
block_source_config.create_cached_block_source(next_block_number).await;
|
||||
block_source_config.create_cached_block_source((&*chain_spec).clone(), next_block_number).await;
|
||||
start_pseudo_peer(chain_spec, local_node_record.to_string(), block_source)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@ -7,7 +7,7 @@ use alloy_rlp::{Decodable, Encodable, RlpDecodable, RlpEncodable};
|
||||
use bytes::BufMut;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{chainspec::MAINNET_CHAIN_ID, HlBlock};
|
||||
use crate::HlBlock;
|
||||
|
||||
pub type ReadPrecompileCall = (Address, Vec<(ReadPrecompileInput, ReadPrecompileResult)>);
|
||||
|
||||
@ -50,13 +50,13 @@ pub struct BlockAndReceipts {
|
||||
}
|
||||
|
||||
impl BlockAndReceipts {
|
||||
pub fn to_reth_block(self) -> HlBlock {
|
||||
pub fn to_reth_block(self, chain_id: u64) -> HlBlock {
|
||||
let EvmBlock::Reth115(block) = self.block;
|
||||
block.to_reth_block(
|
||||
self.read_precompile_calls.clone(),
|
||||
self.highest_precompile_address,
|
||||
self.system_txs.clone(),
|
||||
MAINNET_CHAIN_ID,
|
||||
chain_id,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user