mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 21:21:11 +00:00
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`.
This commit is contained in:
@@ -29,7 +29,6 @@ sp-runtime = { version = "3.0.0", default-features = false, path = "../../primit
|
||||
sp-session = { version = "3.0.0", default-features = false, path = "../../primitives/session" }
|
||||
sp-staking = { version = "3.0.0", default-features = false, path = "../../primitives/staking" }
|
||||
sp-std = { version = "3.0.0", default-features = false, path = "../../primitives/std" }
|
||||
sp-timestamp = { version = "3.0.0", default-features = false, path = "../../primitives/timestamp" }
|
||||
log = { version = "0.4.14", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
@@ -59,7 +58,6 @@ std = [
|
||||
"sp-session/std",
|
||||
"sp-staking/std",
|
||||
"sp-std/std",
|
||||
"sp-timestamp/std",
|
||||
"log/std",
|
||||
]
|
||||
runtime-benchmarks = ["frame-benchmarking"]
|
||||
|
||||
@@ -25,7 +25,7 @@ use codec::{Decode, Encode};
|
||||
use frame_support::{
|
||||
decl_error, decl_module, decl_storage,
|
||||
dispatch::DispatchResultWithPostInfo,
|
||||
traits::{FindAuthor, Get, KeyOwnerProofSystem, OneSessionHandler},
|
||||
traits::{FindAuthor, Get, KeyOwnerProofSystem, OneSessionHandler, OnTimestampSet},
|
||||
weights::{Pays, Weight},
|
||||
Parameter,
|
||||
};
|
||||
@@ -38,7 +38,6 @@ use sp_runtime::{
|
||||
};
|
||||
use sp_session::{GetSessionNumber, GetValidatorCount};
|
||||
use sp_std::prelude::*;
|
||||
use sp_timestamp::OnTimestampSet;
|
||||
|
||||
use sp_consensus_babe::{
|
||||
digests::{NextConfigDescriptor, NextEpochDescriptor, PreDigest},
|
||||
|
||||
Reference in New Issue
Block a user