Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trait bounds to config: Index: Default, BlockNumber: AtLeast32BitsUnsigned #648

Merged
merged 3 commits into from
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions primitives/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -45,7 +45,8 @@ pub trait Config {
+ DeserializeOwned
+ core::hash::Hash
+ core::str::FromStr
+ Into<u64>;
+ Into<u64>
+ AtLeast32BitUnsigned;

/// The output of the `Hashing` function.
type Hash: Debug
Expand Down