Skip to content

Commit

Permalink
chore: rm tx alias re-export (#12762)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Nov 22, 2024
1 parent 0eaef1f commit f211aac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion crates/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub use transaction::{
util::secp256k1::{public_key_to_address, recover_signer_unchecked, sign_message},
BlobTransaction, InvalidTransactionError, PooledTransactionsElement,
PooledTransactionsElementEcRecovered, Transaction, TransactionMeta, TransactionSigned,
TransactionSignedEcRecovered, TransactionSignedNoHash, TxHashOrNumber, TxType,
TransactionSignedEcRecovered, TransactionSignedNoHash, TxType,
};

// Re-exports
Expand Down
4 changes: 0 additions & 4 deletions crates/primitives/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use alloy_consensus::{
TxEip4844, TxEip7702, TxLegacy,
};
use alloy_eips::{
eip1898::BlockHashOrNumber,
eip2718::{Decodable2718, Eip2718Error, Eip2718Result, Encodable2718},
eip2930::AccessList,
eip7702::SignedAuthorization,
Expand Down Expand Up @@ -61,9 +60,6 @@ pub mod signature;
pub(crate) mod util;
mod variant;

/// Either a transaction hash or number.
pub type TxHashOrNumber = BlockHashOrNumber;

/// Expected number of transactions where we can expect a speed-up by recovering the senders in
/// parallel.
pub static PARALLEL_SENDER_RECOVERY_THRESHOLD: LazyLock<usize> =
Expand Down
20 changes: 8 additions & 12 deletions crates/storage/errors/src/provider.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
use crate::{db::DatabaseError, lockfile::StorageLockError, writer::UnifiedStorageWriterError};
use alloy_eips::BlockHashOrNumber;
use alloc::{boxed::Box, string::String};
use alloy_eips::{BlockHashOrNumber, HashOrNumber};
use alloy_primitives::{Address, BlockHash, BlockNumber, TxNumber, B256};
use derive_more::Display;
use reth_primitives::{GotExpected, StaticFileSegment, TxHashOrNumber};

#[cfg(feature = "std")]
use std::path::PathBuf;

use alloc::{boxed::Box, string::String};
use reth_primitives::{GotExpected, StaticFileSegment};

/// Provider result type.
pub type ProviderResult<Ok> = Result<Ok, ProviderError>;
Expand Down Expand Up @@ -66,12 +62,12 @@ pub enum ProviderError {
/// when required header related data was not found but was required.
#[display("no header found for {_0:?}")]
HeaderNotFound(BlockHashOrNumber),
/// The specific transaction is missing.
/// The specific transaction identified by hash or id is missing.
#[display("no transaction found for {_0:?}")]
TransactionNotFound(TxHashOrNumber),
/// The specific receipt is missing
TransactionNotFound(HashOrNumber),
/// The specific receipt for a transaction identified by hash or id is missing
#[display("no receipt found for {_0:?}")]
ReceiptNotFound(TxHashOrNumber),
ReceiptNotFound(HashOrNumber),
/// Unable to find the best block.
#[display("best block does not exist")]
BestBlockNotFound,
Expand Down Expand Up @@ -111,7 +107,7 @@ pub enum ProviderError {
/// Static File is not found at specified path.
#[cfg(feature = "std")]
#[display("not able to find {_0} static file at {_1:?}")]
MissingStaticFilePath(StaticFileSegment, PathBuf),
MissingStaticFilePath(StaticFileSegment, std::path::PathBuf),
/// Static File is not found for requested block.
#[display("not able to find {_0} static file for block number {_1}")]
MissingStaticFileBlock(StaticFileSegment, BlockNumber),
Expand Down

0 comments on commit f211aac

Please sign in to comment.