mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
cfg: replace std feature gate alloc imports with extern crate alloc (#10861)
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
//! EIP-6110 deposit requests parsing
|
||||
use alloc::{string::ToString, vec::Vec};
|
||||
use alloy_eips::eip6110::{DepositRequest, MAINNET_DEPOSIT_CONTRACT_ADDRESS};
|
||||
use alloy_sol_types::{sol, SolEvent};
|
||||
use reth_chainspec::ChainSpec;
|
||||
@ -6,9 +7,6 @@ use reth_evm::execute::BlockValidationError;
|
||||
use reth_primitives::{Receipt, Request};
|
||||
use revm_primitives::Log;
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::{string::ToString, vec::Vec};
|
||||
|
||||
sol! {
|
||||
#[allow(missing_docs)]
|
||||
event DepositEvent(
|
||||
|
||||
@ -4,6 +4,7 @@ use crate::{
|
||||
dao_fork::{DAO_HARDFORK_BENEFICIARY, DAO_HARDKFORK_ACCOUNTS},
|
||||
EthEvmConfig,
|
||||
};
|
||||
use alloc::{boxed::Box, sync::Arc, vec, vec::Vec};
|
||||
use core::fmt::Display;
|
||||
use reth_chainspec::{ChainSpec, EthereumHardforks, MAINNET};
|
||||
use reth_ethereum_consensus::validate_block_post_execution;
|
||||
@ -32,11 +33,6 @@ use revm_primitives::{
|
||||
BlockEnv, CfgEnvWithHandlerCfg, EVMError, EnvWithHandlerCfg, ResultAndState,
|
||||
};
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::{boxed::Box, sync::Arc, vec, vec::Vec};
|
||||
#[cfg(feature = "std")]
|
||||
use std::sync::Arc;
|
||||
|
||||
/// Provides executors to execute regular ethereum blocks
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct EthExecutorProvider<EvmConfig = EthEvmConfig> {
|
||||
|
||||
@ -9,18 +9,14 @@
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
extern crate alloc;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use reth_chainspec::{ChainSpec, Head};
|
||||
use reth_evm::{ConfigureEvm, ConfigureEvmEnv};
|
||||
use reth_primitives::{transaction::FillTxEnv, Address, Header, TransactionSigned, U256};
|
||||
use revm_primitives::{AnalysisKind, Bytes, CfgEnvWithHandlerCfg, Env, TxEnv, TxKind};
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::vec::Vec;
|
||||
use std::sync::Arc;
|
||||
|
||||
mod config;
|
||||
pub use config::{revm_spec, revm_spec_by_timestamp_after_merge};
|
||||
|
||||
Reference in New Issue
Block a user