mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: enable autoseal in op correctly (#8961)
This commit is contained in:
@ -15,7 +15,9 @@ workspace = true
|
||||
reth-chainspec.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
reth-payload-builder.workspace = true
|
||||
reth-auto-seal-consensus.workspace = true
|
||||
reth-basic-payload-builder.workspace = true
|
||||
reth-consensus.workspace = true
|
||||
reth-optimism-payload-builder.workspace = true
|
||||
reth-rpc-types.workspace = true
|
||||
reth-rpc.workspace = true
|
||||
@ -67,4 +69,5 @@ optimism = [
|
||||
"reth-optimism-payload-builder/optimism",
|
||||
"reth-beacon-consensus/optimism",
|
||||
"reth-revm/optimism",
|
||||
"reth-auto-seal-consensus/optimism",
|
||||
]
|
||||
|
||||
@ -25,6 +25,7 @@ use reth_transaction_pool::{
|
||||
blobstore::DiskFileBlobStore, CoinbaseTipOrdering, TransactionPool,
|
||||
TransactionValidationTaskExecutor,
|
||||
};
|
||||
use std::sync::Arc;
|
||||
|
||||
/// Type configuration for a regular Optimism node.
|
||||
#[derive(Debug, Default, Clone)]
|
||||
@ -317,9 +318,13 @@ impl<Node> ConsensusBuilder<Node> for OptimismConsensusBuilder
|
||||
where
|
||||
Node: FullNodeTypes,
|
||||
{
|
||||
type Consensus = OptimismBeaconConsensus;
|
||||
type Consensus = Arc<dyn reth_consensus::Consensus>;
|
||||
|
||||
async fn build_consensus(self, ctx: &BuilderContext<Node>) -> eyre::Result<Self::Consensus> {
|
||||
Ok(OptimismBeaconConsensus::new(ctx.chain_spec()))
|
||||
if ctx.is_dev() {
|
||||
Ok(Arc::new(reth_auto_seal_consensus::AutoSealConsensus::new(ctx.chain_spec())))
|
||||
} else {
|
||||
Ok(Arc::new(OptimismBeaconConsensus::new(ctx.chain_spec())))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user