paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.99k stars 1.21k forks source link

perf(evm-config): return `&Arc<ChainSpec>` #12748

Closed hai-rise closed 12 hours ago

hai-rise commented 13 hours ago

Similar to https://github.com/paradigmxyz/reth/pull/12268/files#diff-e5e49f8eb6c0c2d8a4768b03ecb2966ca7d5679086fbc71e32b4cda348b84744R34.

This allows *EvmConfig users who need an Arc<ChainSpec> to clone the Arc directly from the *EvmConfig. Currently they would need to clone the chain spec then create a new Arc from it.