Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add tx trait bounds to primitives #13075

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 4 additions & 23 deletions crates/primitives-traits/src/node.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use core::fmt;

use crate::{
Block, BlockBody, BlockHeader, FullBlock, FullBlockBody, FullBlockHeader, FullReceipt,
FullSignedTx, FullTxType, MaybeArbitrary, MaybeSerde, Receipt,
FullSignedTx, FullTxType, Receipt, SignedTransaction, TxType,
};
use core::fmt;

/// Configures all the primitive types of the node.
pub trait NodePrimitives:
Expand All @@ -16,27 +15,9 @@ pub trait NodePrimitives:
/// Block body primitive.
type BlockBody: BlockBody<Transaction = Self::SignedTx, OmmerHeader = Self::BlockHeader>;
/// Signed version of the transaction type.
type SignedTx: Send
+ Sync
+ Unpin
+ Clone
+ fmt::Debug
+ PartialEq
+ Eq
+ MaybeSerde
+ MaybeArbitrary
+ 'static;
type SignedTx: SignedTransaction<Type = Self::TxType> + 'static;
/// Transaction envelope type ID.
type TxType: Send
+ Sync
+ Unpin
+ Clone
+ Default
+ fmt::Debug
+ PartialEq
+ Eq
+ MaybeArbitrary
+ 'static;
type TxType: TxType + 'static;
/// A receipt.
type Receipt: Receipt;
}
Expand Down
Loading