chore(sdk): Add MaybeArbitrary to all ATs on NodePrimitives (#12847)

This commit is contained in:
Z
2024-11-27 17:54:39 +08:00
committed by GitHub
parent 3b8c661ad4
commit 51afa4cdc9

View File

@ -2,7 +2,7 @@ use core::fmt;
use crate::{
Block, BlockBody, BlockHeader, FullBlock, FullBlockBody, FullBlockHeader, FullReceipt,
FullSignedTx, FullTxType, MaybeSerde,
FullSignedTx, FullTxType, MaybeArbitrary, MaybeSerde,
};
/// Configures all the primitive types of the node.
@ -16,9 +16,27 @@ 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 + 'static;
type SignedTx: Send
+ Sync
+ Unpin
+ Clone
+ fmt::Debug
+ PartialEq
+ Eq
+ MaybeSerde
+ MaybeArbitrary
+ 'static;
/// Transaction envelope type ID.
type TxType: Send + Sync + Unpin + Clone + Default + fmt::Debug + PartialEq + Eq + 'static;
type TxType: Send
+ Sync
+ Unpin
+ Clone
+ Default
+ fmt::Debug
+ PartialEq
+ Eq
+ MaybeArbitrary
+ 'static;
/// A receipt.
type Receipt: Send
+ Sync
@ -29,6 +47,7 @@ pub trait NodePrimitives:
+ PartialEq
+ Eq
+ MaybeSerde
+ MaybeArbitrary
+ 'static;
}
/// Helper trait that sets trait bounds on [`NodePrimitives`].