mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: use reth_chainspec where possible (#8891)
This commit is contained in:
@ -13,6 +13,7 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
# reth
|
||||
reth-chainspec.workspace = true
|
||||
reth-eth-wire-types.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
reth-fs-util.workspace = true
|
||||
|
||||
@ -79,7 +79,7 @@
|
||||
//! Listen for new transactions and print them:
|
||||
//!
|
||||
//! ```
|
||||
//! use reth_primitives::MAINNET;
|
||||
//! use reth_chainspec::MAINNET;
|
||||
//! use reth_provider::{BlockReaderIdExt, ChainSpecProvider, StateProviderFactory};
|
||||
//! use reth_tasks::TokioTaskExecutor;
|
||||
//! use reth_transaction_pool::{TransactionValidationTaskExecutor, Pool, TransactionPool};
|
||||
@ -107,7 +107,7 @@
|
||||
//!
|
||||
//! ```
|
||||
//! use futures_util::Stream;
|
||||
//! use reth_primitives::MAINNET;
|
||||
//! use reth_chainspec::MAINNET;
|
||||
//! use reth_provider::{BlockReaderIdExt, CanonStateNotification, ChainSpecProvider, StateProviderFactory};
|
||||
//! use reth_tasks::TokioTaskExecutor;
|
||||
//! use reth_tasks::TaskSpawner;
|
||||
@ -285,7 +285,7 @@ where
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use reth_primitives::MAINNET;
|
||||
/// use reth_chainspec::MAINNET;
|
||||
/// use reth_provider::{BlockReaderIdExt, StateProviderFactory};
|
||||
/// use reth_tasks::TokioTaskExecutor;
|
||||
/// use reth_transaction_pool::{
|
||||
|
||||
@ -681,8 +681,9 @@ mod tests {
|
||||
blobstore::InMemoryBlobStore, validate::EthTransactionValidatorBuilder,
|
||||
CoinbaseTipOrdering, EthPooledTransaction, Pool, PoolTransaction, TransactionOrigin,
|
||||
};
|
||||
use reth_chainspec::MAINNET;
|
||||
use reth_fs_util as fs;
|
||||
use reth_primitives::{hex, PooledTransactionsElement, MAINNET, U256};
|
||||
use reth_primitives::{hex, PooledTransactionsElement, U256};
|
||||
use reth_provider::test_utils::{ExtendedAccount, MockEthProvider};
|
||||
use reth_tasks::TaskManager;
|
||||
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
use crate::EthPooledTransaction;
|
||||
use rand::Rng;
|
||||
use reth_chainspec::MAINNET;
|
||||
use reth_primitives::{
|
||||
constants::MIN_PROTOCOL_BASE_FEE, sign_message, AccessList, Address, Bytes, Transaction,
|
||||
TransactionSigned, TryFromRecoveredTransaction, TxEip1559, TxEip4844, TxKind, TxLegacy, B256,
|
||||
MAINNET, U256,
|
||||
U256,
|
||||
};
|
||||
|
||||
/// A generator for transactions for testing purposes.
|
||||
|
||||
@ -9,6 +9,7 @@ use crate::{
|
||||
EthBlobTransactionSidecar, EthPoolTransaction, LocalTransactionConfig, PoolTransaction,
|
||||
TransactionValidationOutcome, TransactionValidationTaskExecutor, TransactionValidator,
|
||||
};
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_primitives::{
|
||||
constants::{
|
||||
eip4844::{MAINNET_KZG_TRUSTED_SETUP, MAX_BLOBS_PER_BLOCK},
|
||||
@ -16,8 +17,8 @@ use reth_primitives::{
|
||||
},
|
||||
kzg::KzgSettings,
|
||||
revm::compat::calculate_intrinsic_gas_after_merge,
|
||||
ChainSpec, GotExpected, InvalidTransactionError, SealedBlock, EIP1559_TX_TYPE_ID,
|
||||
EIP2930_TX_TYPE_ID, EIP4844_TX_TYPE_ID, LEGACY_TX_TYPE_ID,
|
||||
GotExpected, InvalidTransactionError, SealedBlock, EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID,
|
||||
EIP4844_TX_TYPE_ID, LEGACY_TX_TYPE_ID,
|
||||
};
|
||||
use reth_provider::{AccountReader, BlockReaderIdExt, StateProviderFactory};
|
||||
use reth_tasks::TaskSpawner;
|
||||
@ -734,9 +735,8 @@ mod tests {
|
||||
blobstore::InMemoryBlobStore, error::PoolErrorKind, CoinbaseTipOrdering,
|
||||
EthPooledTransaction, Pool, TransactionPool,
|
||||
};
|
||||
use reth_primitives::{
|
||||
hex, FromRecoveredPooledTransaction, PooledTransactionsElement, MAINNET, U256,
|
||||
};
|
||||
use reth_chainspec::MAINNET;
|
||||
use reth_primitives::{hex, FromRecoveredPooledTransaction, PooledTransactionsElement, U256};
|
||||
use reth_provider::test_utils::{ExtendedAccount, MockEthProvider};
|
||||
|
||||
fn get_transaction() -> EthPooledTransaction {
|
||||
|
||||
@ -7,7 +7,8 @@ use crate::{
|
||||
TransactionValidator,
|
||||
};
|
||||
use futures_util::{lock::Mutex, StreamExt};
|
||||
use reth_primitives::{ChainSpec, SealedBlock};
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_primitives::SealedBlock;
|
||||
use reth_provider::BlockReaderIdExt;
|
||||
use reth_tasks::TaskSpawner;
|
||||
use std::{future::Future, pin::Pin, sync::Arc};
|
||||
|
||||
Reference in New Issue
Block a user