mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: make DatabaseProvider generic over chainspec (#10978)
This commit is contained in:
@ -48,6 +48,8 @@ thiserror.workspace = true
|
||||
schnellru.workspace = true
|
||||
itertools.workspace = true
|
||||
|
||||
reth-chainspec = { workspace = true, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
# reth
|
||||
reth-payload-builder = { workspace = true, features = ["test-utils"] }
|
||||
@ -79,4 +81,5 @@ optimism = [
|
||||
"reth-primitives/optimism",
|
||||
"reth-provider/optimism",
|
||||
"reth-blockchain-tree/optimism",
|
||||
"reth-chainspec"
|
||||
]
|
||||
|
||||
@ -197,7 +197,7 @@ where
|
||||
/// The payload store.
|
||||
payload_builder: PayloadBuilderHandle<N::Engine>,
|
||||
/// Validator for execution payloads
|
||||
payload_validator: ExecutionPayloadValidator,
|
||||
payload_validator: ExecutionPayloadValidator<N::ChainSpec>,
|
||||
/// Current blockchain tree action.
|
||||
blockchain_tree_action: Option<BlockchainTreeAction<N::Engine>>,
|
||||
/// Pending forkchoice update.
|
||||
@ -462,7 +462,8 @@ where
|
||||
) -> bool {
|
||||
// On Optimism, the proposers are allowed to reorg their own chain at will.
|
||||
#[cfg(feature = "optimism")]
|
||||
if self.blockchain.chain_spec().is_optimism() {
|
||||
if reth_chainspec::EthChainSpec::chain(self.blockchain.chain_spec().as_ref()).is_optimism()
|
||||
{
|
||||
debug!(
|
||||
target: "consensus::engine",
|
||||
fcu_head_num=?header.number,
|
||||
|
||||
@ -517,7 +517,7 @@ mod tests {
|
||||
fn build<N>(
|
||||
self,
|
||||
pipeline: Pipeline<N>,
|
||||
chain_spec: Arc<ChainSpec>,
|
||||
chain_spec: Arc<N::ChainSpec>,
|
||||
) -> EngineSyncController<N, Either<Client, TestFullBlockClient>>
|
||||
where
|
||||
N: ProviderNodeTypes,
|
||||
|
||||
Reference in New Issue
Block a user