mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: replace once_cell with std (#11694)
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
This commit is contained in:
@ -41,5 +41,10 @@ proptest.workspace = true
|
||||
default = ["std", "serde", "rustc-hash"]
|
||||
arbitrary = ["dep:arbitrary", "dep:proptest", "dep:proptest-derive"]
|
||||
serde = ["dep:serde"]
|
||||
std = ["thiserror-no-std/std", "rustc-hash/std"]
|
||||
std = [
|
||||
"alloy-chains/std",
|
||||
"alloy-primitives/std",
|
||||
"thiserror-no-std/std",
|
||||
"rustc-hash/std",
|
||||
]
|
||||
rustc-hash = ["dep:rustc-hash"]
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
use alloc::vec;
|
||||
|
||||
use alloy_primitives::U256;
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
use once_cell as _;
|
||||
#[cfg(not(feature = "std"))]
|
||||
use once_cell::sync::Lazy as LazyLock;
|
||||
#[cfg(feature = "std")]
|
||||
use std::sync::LazyLock;
|
||||
|
||||
use crate::{ChainHardforks, EthereumHardfork, ForkCondition};
|
||||
|
||||
/// Dev hardforks
|
||||
pub static DEV_HARDFORKS: Lazy<ChainHardforks> = Lazy::new(|| {
|
||||
pub static DEV_HARDFORKS: LazyLock<ChainHardforks> = LazyLock::new(|| {
|
||||
ChainHardforks::new(vec![
|
||||
(EthereumHardfork::Frontier.boxed(), ForkCondition::Block(0)),
|
||||
(EthereumHardfork::Homestead.boxed(), ForkCondition::Block(0)),
|
||||
|
||||
Reference in New Issue
Block a user