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