chore: add tx trait bounds to primitives (#13075)

This commit is contained in:
Matthias Seitz
2024-12-02 20:53:41 +01:00
committed by GitHub
parent 8d10b93295
commit d7f5846a37

View File

@ -1,9 +1,8 @@
use core::fmt;
use crate::{ use crate::{
Block, BlockBody, BlockHeader, FullBlock, FullBlockBody, FullBlockHeader, FullReceipt, 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. /// Configures all the primitive types of the node.
pub trait NodePrimitives: pub trait NodePrimitives:
@ -16,27 +15,9 @@ pub trait NodePrimitives:
/// Block body primitive. /// Block body primitive.
type BlockBody: BlockBody<Transaction = Self::SignedTx, OmmerHeader = Self::BlockHeader>; type BlockBody: BlockBody<Transaction = Self::SignedTx, OmmerHeader = Self::BlockHeader>;
/// Signed version of the transaction type. /// Signed version of the transaction type.
type SignedTx: Send type SignedTx: SignedTransaction<Type = Self::TxType> + 'static;
+ Sync
+ Unpin
+ Clone
+ fmt::Debug
+ PartialEq
+ Eq
+ MaybeSerde
+ MaybeArbitrary
+ 'static;
/// Transaction envelope type ID. /// Transaction envelope type ID.
type TxType: Send type TxType: TxType + 'static;
+ Sync
+ Unpin
+ Clone
+ Default
+ fmt::Debug
+ PartialEq
+ Eq
+ MaybeArbitrary
+ 'static;
/// A receipt. /// A receipt.
type Receipt: Receipt; type Receipt: Receipt;
} }