From 51afa4cdc94fc29909cb2b6eda1c30c11e102c00 Mon Sep 17 00:00:00 2001 From: Z <12710516+zitup@users.noreply.github.com> Date: Wed, 27 Nov 2024 17:54:39 +0800 Subject: [PATCH] chore(sdk): Add MaybeArbitrary to all ATs on NodePrimitives (#12847) --- crates/primitives-traits/src/node.rs | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/crates/primitives-traits/src/node.rs b/crates/primitives-traits/src/node.rs index 8081a453ca..4adf258177 100644 --- a/crates/primitives-traits/src/node.rs +++ b/crates/primitives-traits/src/node.rs @@ -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; /// 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`].