Skip to content

Commit

Permalink
chore: move GotExpected, log and gas_units to `reth-primitives-…
Browse files Browse the repository at this point in the history
  • Loading branch information
joshieDo committed Jun 19, 2024
1 parent d0b27f0 commit 5a1c990
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
use alloy_primitives::{address, b256, Address, B256, U256};
use core::time::Duration;

/// Gas units, for example [`GIGAGAS`](gas_units::GIGAGAS).
pub mod gas_units;

/// The client version: `reth/v{major}.{minor}.{patch}`
pub const RETH_CLIENT_VERSION: &str = concat!("reth/v", env!("CARGO_PKG_VERSION"));

Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions crates/primitives-traits/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ pub use request::{Request, Requests};
mod withdrawal;
pub use withdrawal::{Withdrawal, Withdrawals};

mod error;
pub use error::{GotExpected, GotExpectedBoxed};

mod log;
pub use log::{logs_bloom, Log};

mod storage;
pub use storage::StorageEntry;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::Bloom;

use alloy_primitives::Bloom;
pub use alloy_primitives::Log;

/// Calculate receipt logs bloom.
Expand Down
13 changes: 0 additions & 13 deletions crates/primitives/src/constants/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,5 @@

pub use reth_primitives_traits::constants::*;

/// Gas units, for example [`GIGAGAS`](gas_units::GIGAGAS).
pub mod gas_units;

/// [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844#parameters) constants.
pub mod eip4844;

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn min_protocol_sanity() {
assert_eq!(MIN_PROTOCOL_BASE_FEE_U256.to::<u64>(), MIN_PROTOCOL_BASE_FEE);
}
}
7 changes: 2 additions & 5 deletions crates/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ mod block;
mod compression;
pub mod constants;
pub mod eip4844;
mod error;
pub mod genesis;
pub mod header;
mod log;
pub mod proofs;
mod receipt;
/// Helpers for working with revm
Expand All @@ -52,15 +50,14 @@ pub use constants::{
DEV_GENESIS_HASH, EMPTY_OMMER_ROOT_HASH, GOERLI_GENESIS_HASH, HOLESKY_GENESIS_HASH,
KECCAK_EMPTY, MAINNET_GENESIS_HASH, SEPOLIA_GENESIS_HASH,
};
pub use error::{GotExpected, GotExpectedBoxed};
pub use genesis::{ChainConfig, Genesis, GenesisAccount};
pub use header::{Header, HeadersDirection, SealedHeader};
pub use log::{logs_bloom, Log};
pub use receipt::{
gas_spent_by_transactions, Receipt, ReceiptWithBloom, ReceiptWithBloomRef, Receipts,
};
pub use reth_primitives_traits::{
Account, Bytecode, Request, Requests, StorageEntry, Withdrawal, Withdrawals,
logs_bloom, Account, Bytecode, GotExpected, GotExpectedBoxed, Log, Request, Requests,
StorageEntry, Withdrawal, Withdrawals,
};
pub use static_file::StaticFileSegment;

Expand Down

0 comments on commit 5a1c990

Please sign in to comment.