mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
chore: add tx trait bounds to primitives (#13075)
This commit is contained in:
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user