Convert timestamp to unit type wrapper (#8333)
The timestamp inherent type was up to now just a simple `u64`. This worked, but doesn't give you that much guarantees at compile time about the type. This pr changes that by converting this type to a unit type wrapper, similar to what we have done for `Slot`. This is required for some future pr that touches quite a lot of the inherents stuff :) Besides this unit wrapper type, this pr also moves the `OnTimestampSet` trait to `frame_support::traits`.
Showing
- substrate/Cargo.lock 0 additions, 3 deletionssubstrate/Cargo.lock
- substrate/client/consensus/aura/src/lib.rs 3 additions, 3 deletionssubstrate/client/consensus/aura/src/lib.rs
- substrate/client/consensus/babe/src/lib.rs 3 additions, 3 deletionssubstrate/client/consensus/babe/src/lib.rs
- substrate/client/consensus/manual-seal/src/consensus/babe.rs 5 additions, 2 deletionssubstrate/client/consensus/manual-seal/src/consensus/babe.rs
- substrate/client/consensus/pow/src/lib.rs 1 addition, 1 deletionsubstrate/client/consensus/pow/src/lib.rs
- substrate/frame/aura/Cargo.toml 0 additions, 2 deletionssubstrate/frame/aura/Cargo.toml
- substrate/frame/aura/src/lib.rs 3 additions, 2 deletionssubstrate/frame/aura/src/lib.rs
- substrate/frame/babe/Cargo.toml 0 additions, 2 deletionssubstrate/frame/babe/Cargo.toml
- substrate/frame/babe/src/lib.rs 1 addition, 2 deletionssubstrate/frame/babe/src/lib.rs
- substrate/frame/support/src/traits.rs 7 additions, 0 deletionssubstrate/frame/support/src/traits.rs
- substrate/frame/timestamp/src/lib.rs 8 additions, 8 deletionssubstrate/frame/timestamp/src/lib.rs
- substrate/primitives/consensus/aura/src/inherents.rs 1 addition, 1 deletionsubstrate/primitives/consensus/aura/src/inherents.rs
- substrate/primitives/consensus/babe/src/inherents.rs 1 addition, 1 deletionsubstrate/primitives/consensus/babe/src/inherents.rs
- substrate/primitives/std/with_std.rs 1 addition, 0 deletionssubstrate/primitives/std/with_std.rs
- substrate/primitives/std/without_std.rs 1 addition, 0 deletionssubstrate/primitives/std/without_std.rs
- substrate/primitives/timestamp/Cargo.toml 0 additions, 1 deletionsubstrate/primitives/timestamp/Cargo.toml
- substrate/primitives/timestamp/src/lib.rs 78 additions, 12 deletionssubstrate/primitives/timestamp/src/lib.rs
Please register or sign in to comment