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:
@ -56,13 +56,14 @@ metrics.workspace = true
|
||||
# misc
|
||||
auto_impl.workspace = true
|
||||
itertools.workspace = true
|
||||
notify = { workspace = true, default-features = false, features = ["macos_fsevent"] }
|
||||
notify = { workspace = true, default-features = false, features = [
|
||||
"macos_fsevent",
|
||||
] }
|
||||
parking_lot.workspace = true
|
||||
dashmap = { workspace = true, features = ["inline"] }
|
||||
strum.workspace = true
|
||||
|
||||
# test-utils
|
||||
once_cell = { workspace = true, optional = true }
|
||||
reth-ethereum-engine-primitives = { workspace = true, optional = true }
|
||||
alloy-consensus = { workspace = true, optional = true }
|
||||
|
||||
@ -79,20 +80,22 @@ parking_lot.workspace = true
|
||||
tempfile.workspace = true
|
||||
assert_matches.workspace = true
|
||||
rand.workspace = true
|
||||
once_cell.workspace = true
|
||||
eyre.workspace = true
|
||||
|
||||
alloy-consensus.workspace = true
|
||||
|
||||
[features]
|
||||
optimism = ["reth-primitives/optimism", "reth-execution-types/optimism", "reth-optimism-primitives"]
|
||||
optimism = [
|
||||
"reth-primitives/optimism",
|
||||
"reth-execution-types/optimism",
|
||||
"reth-optimism-primitives",
|
||||
]
|
||||
serde = ["reth-execution-types/serde"]
|
||||
test-utils = [
|
||||
"reth-db/test-utils",
|
||||
"reth-nippy-jar/test-utils",
|
||||
"reth-trie/test-utils",
|
||||
"reth-chain-state/test-utils",
|
||||
"once_cell",
|
||||
"reth-ethereum-engine-primitives",
|
||||
"alloy-consensus",
|
||||
]
|
||||
|
||||
@ -5,7 +5,7 @@ use alloy_primitives::{
|
||||
b256, hex_literal::hex, map::HashMap, Address, BlockNumber, Bytes, Log, Parity, Sealable,
|
||||
TxKind, B256, U256,
|
||||
};
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
use reth_db::tables;
|
||||
use reth_db_api::{database::Database, models::StoredBlockBodyIndices};
|
||||
use reth_primitives::{
|
||||
@ -14,7 +14,7 @@ use reth_primitives::{
|
||||
};
|
||||
use reth_trie::root::{state_root_unhashed, storage_root_unhashed};
|
||||
use revm::{db::BundleState, primitives::AccountInfo};
|
||||
use std::str::FromStr;
|
||||
use std::{str::FromStr, sync::LazyLock};
|
||||
|
||||
/// Assert genesis block
|
||||
pub fn assert_genesis_block<DB: Database, Spec: Send + Sync>(
|
||||
@ -61,7 +61,7 @@ pub fn assert_genesis_block<DB: Database, Spec: Send + Sync>(
|
||||
// StageCheckpoints is not updated in tests
|
||||
}
|
||||
|
||||
pub(crate) static TEST_BLOCK: Lazy<SealedBlock> = Lazy::new(|| SealedBlock {
|
||||
pub(crate) static TEST_BLOCK: LazyLock<SealedBlock> = LazyLock::new(|| SealedBlock {
|
||||
header: SealedHeader::new(
|
||||
Header {
|
||||
parent_hash: hex!("c86e8cc0310ae7c531c758678ddbfd16fc51c8cef8cec650b032de9869e8b94f")
|
||||
|
||||
Reference in New Issue
Block a user