Skip to content

Commit

Permalink
chore: remove default bound for txs (#12834)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Nov 24, 2024
1 parent 53839a9 commit 02824da
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 deletions.
11 changes: 1 addition & 10 deletions crates/primitives-traits/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,7 @@ pub trait NodePrimitives:
+ MaybeSerde
+ 'static;
/// Signed version of the transaction type.
type SignedTx: Send
+ Sync
+ Unpin
+ Clone
+ Default
+ fmt::Debug
+ PartialEq
+ Eq
+ MaybeSerde
+ 'static;
type SignedTx: Send + Sync + Unpin + Clone + fmt::Debug + PartialEq + Eq + MaybeSerde + 'static;
/// Transaction envelope type ID.
type TxType: Send + Sync + Unpin + Clone + Default + fmt::Debug + PartialEq + Eq + 'static;
/// A receipt.
Expand Down
2 changes: 0 additions & 2 deletions crates/primitives-traits/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ pub trait Transaction:
+ Sync
+ Unpin
+ Clone
+ Default
+ fmt::Debug
+ Eq
+ PartialEq
Expand All @@ -35,7 +34,6 @@ impl<T> Transaction for T where
+ Sync
+ Unpin
+ Clone
+ Default
+ fmt::Debug
+ Eq
+ PartialEq
Expand Down
1 change: 0 additions & 1 deletion crates/primitives-traits/src/transaction/signed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ pub trait SignedTransaction:
+ Sync
+ Unpin
+ Clone
+ Default
+ fmt::Debug
+ PartialEq
+ Eq
Expand Down
8 changes: 1 addition & 7 deletions crates/primitives/src/transaction/pooled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{
use alloy_consensus::{
constants::EIP4844_TX_TYPE_ID,
transaction::{TxEip1559, TxEip2930, TxEip4844, TxLegacy},
SignableTransaction, Signed, TxEip4844WithSidecar,
Signed, TxEip4844WithSidecar,
};
use alloy_eips::{
eip2718::{Decodable2718, Eip2718Result, Encodable2718},
Expand Down Expand Up @@ -226,12 +226,6 @@ impl PooledTransactionsElement {
}
}

impl Default for PooledTransactionsElement {
fn default() -> Self {
Self::Legacy(TxLegacy::default().into_signed(Signature::test_signature()))
}
}

impl Hash for PooledTransactionsElement {
fn hash<H: Hasher>(&self, state: &mut H) {
self.trie_hash().hash(state);
Expand Down

0 comments on commit 02824da

Please sign in to comment.