From b370b4b14bdab75f7d595575413f494d40f0a9bf Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Thu, 14 Sep 2023 14:45:33 +0200 Subject: [PATCH 1/2] add `AtLeast32BitUnsigned` trait bound for `Config::BlockNumber` --- primitives/src/config/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/primitives/src/config/mod.rs b/primitives/src/config/mod.rs index c3fa4c3e4..47e41eb5e 100644 --- a/primitives/src/config/mod.rs +++ b/primitives/src/config/mod.rs @@ -45,7 +45,8 @@ pub trait Config { + DeserializeOwned + core::hash::Hash + core::str::FromStr - + Into; + + Into + + AtLeast32BitUnsigned; /// The output of the `Hashing` function. type Hash: Debug From ca20e9e1df73638390944f9200655a2f973b060a Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Thu, 14 Sep 2023 14:30:13 +0200 Subject: [PATCH 2/2] add default trait bound for `Config::Index` --- primitives/src/config/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/src/config/mod.rs b/primitives/src/config/mod.rs index 47e41eb5e..cc1de2eef 100644 --- a/primitives/src/config/mod.rs +++ b/primitives/src/config/mod.rs @@ -34,7 +34,7 @@ pub trait Config { /// transactions associated with a sender account. /// This type enforces the (de)serialization implementation /// also in no-std mode (unlike substrates MaybeSerializeDeserialize). - type Index: Debug + Copy + DeserializeOwned + AtLeast32Bit + Decode; + type Index: Default + Debug + Copy + DeserializeOwned + AtLeast32Bit + Decode; /// The block number type used by the runtime. type BlockNumber: Debug