primitives: rm alloy_consensus::transaction reexports (#11191)

This commit is contained in:
Thomas Coratger
2024-09-25 14:13:48 +02:00
committed by GitHub
parent 2224e6c48b
commit 2022dd3de5
42 changed files with 98 additions and 55 deletions

View File

@ -54,6 +54,7 @@ rand = { workspace = true, optional = true }
paste = { workspace = true, optional = true }
proptest = { workspace = true, optional = true }
proptest-arbitrary-interop = { workspace = true, optional = true }
alloy-consensus = { workspace = true, optional = true }
[dev-dependencies]
reth-primitives = { workspace = true, features = ["arbitrary"] }
@ -68,11 +69,12 @@ pprof = { workspace = true, features = ["criterion", "flamegraph"] }
assert_matches.workspace = true
tempfile.workspace = true
serde_json.workspace = true
alloy-consensus.workspace = true
[features]
default = ["serde"]
serde = ["dep:serde"]
test-utils = ["rand", "paste", "serde"]
test-utils = ["rand", "paste", "serde", "alloy-consensus"]
arbitrary = ["proptest", "reth-primitives/arbitrary", "proptest-arbitrary-interop"]
[[bench]]

View File

@ -1,11 +1,11 @@
use crate::EthPooledTransaction;
use alloy_consensus::{TxEip1559, TxEip4844, TxLegacy};
use alloy_eips::eip2930::AccessList;
use alloy_primitives::{Address, TxKind, B256, U256};
use rand::Rng;
use reth_chainspec::MAINNET;
use reth_primitives::{
constants::MIN_PROTOCOL_BASE_FEE, sign_message, Bytes, Transaction, TransactionSigned,
TxEip1559, TxEip4844, TxLegacy,
};
/// A generator for transactions for testing purposes.

View File

@ -7,6 +7,7 @@ use crate::{
CoinbaseTipOrdering, EthBlobTransactionSidecar, EthPoolTransaction, PoolTransaction,
ValidPoolTransaction,
};
use alloy_consensus::{TxEip1559, TxEip2930, TxEip4844, TxLegacy};
use alloy_eips::eip2930::AccessList;
use alloy_primitives::{Address, Bytes, ChainId, TxHash, TxKind, B256, U256};
use paste::paste;
@ -18,9 +19,8 @@ use reth_primitives::{
constants::{eip4844::DATA_GAS_PER_BLOB, MIN_PROTOCOL_BASE_FEE},
transaction::TryFromRecoveredTransactionError,
BlobTransactionSidecar, BlobTransactionValidationError, PooledTransactionsElementEcRecovered,
Signature, Transaction, TransactionSigned, TransactionSignedEcRecovered, TxEip1559, TxEip2930,
TxEip4844, TxLegacy, TxType, EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, EIP4844_TX_TYPE_ID,
LEGACY_TX_TYPE_ID,
Signature, Transaction, TransactionSigned, TransactionSignedEcRecovered, TxType,
EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, EIP4844_TX_TYPE_ID, LEGACY_TX_TYPE_ID,
};
use std::{ops::Range, sync::Arc, time::Instant, vec::IntoIter};

View File

@ -1392,10 +1392,8 @@ impl<Tx: PoolTransaction> Stream for NewSubpoolTransactionStream<Tx> {
#[cfg(test)]
mod tests {
use super::*;
use reth_primitives::{
constants::eip4844::DATA_GAS_PER_BLOB, Signature, TransactionSigned, TxEip1559, TxEip2930,
TxEip4844, TxEip7702, TxLegacy,
};
use alloy_consensus::{TxEip1559, TxEip2930, TxEip4844, TxEip7702, TxLegacy};
use reth_primitives::{constants::eip4844::DATA_GAS_PER_BLOB, Signature, TransactionSigned};
#[test]
fn test_pool_size_invariants() {