mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: no_std for reth-execution-types (#14465)
This commit is contained in:
@ -37,6 +37,14 @@ test-fuzz.workspace = true
|
||||
toml.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"alloy-primitives/std",
|
||||
"derive_more/std",
|
||||
"serde?/std",
|
||||
"serde_json/std",
|
||||
"thiserror/std",
|
||||
]
|
||||
test-utils = [
|
||||
"dep:arbitrary",
|
||||
"reth-codecs?/test-utils",
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
use crate::PrunedSegmentInfo;
|
||||
use alloc::vec::Vec;
|
||||
use alloy_primitives::BlockNumber;
|
||||
use std::time::Duration;
|
||||
use core::time::Duration;
|
||||
|
||||
/// An event emitted by a pruner.
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
|
||||
@ -7,6 +7,9 @@
|
||||
)]
|
||||
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
mod checkpoint;
|
||||
mod event;
|
||||
@ -15,7 +18,10 @@ mod pruner;
|
||||
mod segment;
|
||||
mod target;
|
||||
|
||||
use alloc::{collections::BTreeMap, vec::Vec};
|
||||
use alloy_primitives::{Address, BlockNumber};
|
||||
pub use checkpoint::PruneCheckpoint;
|
||||
use core::ops::Deref;
|
||||
pub use event::PrunerEvent;
|
||||
pub use mode::PruneMode;
|
||||
pub use pruner::{
|
||||
@ -23,12 +29,8 @@ pub use pruner::{
|
||||
SegmentOutputCheckpoint,
|
||||
};
|
||||
pub use segment::{PrunePurpose, PruneSegment, PruneSegmentError};
|
||||
use std::collections::BTreeMap;
|
||||
pub use target::{PruneModes, MINIMUM_PRUNING_DISTANCE};
|
||||
|
||||
use alloy_primitives::{Address, BlockNumber};
|
||||
use std::ops::Deref;
|
||||
|
||||
/// Configuration for pruning receipts not associated with logs emitted by the specified contracts.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Default)]
|
||||
#[cfg_attr(any(test, feature = "serde"), derive(serde::Serialize, serde::Deserialize))]
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
use crate::{PruneCheckpoint, PruneMode, PruneSegment};
|
||||
use alloc::vec::Vec;
|
||||
use alloy_primitives::{BlockNumber, TxNumber};
|
||||
use derive_more::Display;
|
||||
|
||||
|
||||
@ -99,6 +99,7 @@ fn deserialize_opt_prune_mode_with_min_blocks<
|
||||
>(
|
||||
deserializer: D,
|
||||
) -> Result<Option<PruneMode>, D::Error> {
|
||||
use alloc::format;
|
||||
use serde::Deserialize;
|
||||
let prune_mode = Option::<PruneMode>::deserialize(deserializer)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user