mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
feat: reth-primitives-trait no-std support (#8869)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -42,6 +42,8 @@ test-fuzz.workspace = true
|
||||
rand.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = []
|
||||
test-utils = ["arbitrary"]
|
||||
arbitrary = [
|
||||
"dep:arbitrary",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
//! Ethereum protocol-related constants
|
||||
|
||||
use alloy_primitives::{b256, B256, U256};
|
||||
use std::time::Duration;
|
||||
use core::time::Duration;
|
||||
|
||||
/// The client version: `reth/v{major}.{minor}.{patch}`
|
||||
pub const RETH_CLIENT_VERSION: &str = concat!("reth/v", env!("CARGO_PKG_VERSION"));
|
||||
|
||||
@ -15,9 +15,9 @@ use alloy_eips::{
|
||||
use alloy_primitives::{keccak256, Address, BlockNumber, Bloom, Bytes, B256, B64, U256};
|
||||
use alloy_rlp::{length_of_length, Decodable, Encodable};
|
||||
use bytes::BufMut;
|
||||
use core::mem;
|
||||
use reth_codecs::{main_codec, Compact};
|
||||
use revm_primitives::{calc_blob_gasprice, calc_excess_blob_gas};
|
||||
use std::mem;
|
||||
|
||||
/// Block header
|
||||
#[main_codec]
|
||||
|
||||
@ -5,11 +5,11 @@ use alloy_primitives::{keccak256, BlockHash};
|
||||
use alloy_primitives::{BlockNumber, B256, U256};
|
||||
use alloy_rlp::{Decodable, Encodable};
|
||||
use bytes::BufMut;
|
||||
use core::mem;
|
||||
use derive_more::{AsRef, Deref};
|
||||
#[cfg(any(test, feature = "arbitrary"))]
|
||||
use proptest::prelude::*;
|
||||
use reth_codecs::{add_arbitrary_tests, main_codec, Compact};
|
||||
use std::mem;
|
||||
|
||||
/// A [`Header`] that is sealed at a precalculated hash, use [`SealedHeader::unseal()`] if you want
|
||||
/// to modify header.
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
// TODO: remove when https://github.com/proptest-rs/proptest/pull/427 is merged
|
||||
#![allow(unknown_lints, non_local_definitions)]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
#[cfg(feature = "alloy-compat")]
|
||||
mod alloy_compat;
|
||||
|
||||
Reference in New Issue
Block a user