testing: clean up reth-primitives import (#10760)

This commit is contained in:
nk_ysg
2024-09-07 17:11:29 +08:00
committed by GitHub
parent b554eccab9
commit 5194bcfbcc
6 changed files with 12 additions and 6 deletions

2
Cargo.lock generated
View File

@ -2550,6 +2550,7 @@ dependencies = [
name = "ef-tests"
version = "1.0.6"
dependencies = [
"alloy-primitives",
"alloy-rlp",
"rayon",
"reth-chainspec",
@ -8698,6 +8699,7 @@ version = "1.0.6"
dependencies = [
"alloy-eips",
"alloy-genesis",
"alloy-primitives",
"rand 0.8.5",
"reth-primitives",
"secp256k1",

View File

@ -25,6 +25,7 @@ reth-stages.workspace = true
reth-evm-ethereum.workspace = true
alloy-rlp.workspace = true
alloy-primitives.workspace = true
walkdir = "2.3.3"
serde.workspace = true

View File

@ -1,6 +1,7 @@
//! Shared models for <https://github.com/ethereum/tests>
use crate::{assert::assert_equal, Error};
use alloy_primitives::{Address, Bloom, Bytes, B256, B64, U256};
use reth_chainspec::{ChainSpec, ChainSpecBuilder};
use reth_db::tables;
use reth_db_api::{
@ -8,8 +9,8 @@ use reth_db_api::{
transaction::{DbTx, DbTxMut},
};
use reth_primitives::{
keccak256, Account as RethAccount, Address, Bloom, Bytecode, Bytes, Header as RethHeader,
SealedHeader, StorageEntry, Withdrawals, B256, B64, U256,
keccak256, Account as RethAccount, Bytecode, Header as RethHeader, SealedHeader, StorageEntry,
Withdrawals,
};
use serde::Deserialize;
use std::{collections::BTreeMap, ops::Deref};

View File

@ -16,6 +16,7 @@ reth-primitives = { workspace = true, features = ["secp256k1"] }
alloy-eips.workspace = true
alloy-genesis.workspace = true
alloy-primitives.workspace = true
rand.workspace = true
secp256k1 = { workspace = true, features = ["rand"] }

View File

@ -3,14 +3,14 @@
use alloy_eips::{
eip6110::DepositRequest, eip7002::WithdrawalRequest, eip7251::ConsolidationRequest,
};
use alloy_primitives::{Address, BlockNumber, Bytes, TxKind, B256, U256};
pub use rand::Rng;
use rand::{
distributions::uniform::SampleRange, rngs::StdRng, seq::SliceRandom, thread_rng, SeedableRng,
};
use reth_primitives::{
proofs, sign_message, Account, Address, BlockNumber, Bytes, Header, Log, Receipt, Request,
Requests, SealedBlock, SealedHeader, StorageEntry, Transaction, TransactionSigned, TxKind,
TxLegacy, Withdrawal, Withdrawals, B256, U256,
proofs, sign_message, Account, Header, Log, Receipt, Request, Requests, SealedBlock,
SealedHeader, StorageEntry, Transaction, TransactionSigned, TxLegacy, Withdrawal, Withdrawals,
};
use secp256k1::{Keypair, Secp256k1};
use std::{

View File

@ -2,7 +2,8 @@
//! signers to the genesis block.
use alloy_genesis::GenesisAccount;
use reth_primitives::{public_key_to_address, Address, Bytes, B256, U256};
use alloy_primitives::{Address, Bytes, B256, U256};
use reth_primitives::public_key_to_address;
use secp256k1::{
rand::{thread_rng, RngCore},
Keypair, Secp256k1,