Parameter trait for Time::Moment (#4237)

* Debug for Time::Moment

Without this we cannot have a Moment parameter in dispatchable functions

* Update frame/support/src/traits.rs

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* Update traits.rs
This commit is contained in:
Weiliang Li
2019-11-28 17:56:01 +09:00
committed by Bastian Köcher
parent 4a21f9bbfd
commit 630f7d8425
+3 -1
View File
@@ -26,6 +26,8 @@ use sr_primitives::{
traits::{MaybeSerializeDeserialize, SimpleArithmetic, Saturating},
};
use crate::dispatch::Parameter;
/// Anything that can have a `::len()` method.
pub trait Len {
/// Return the length of data type.
@@ -622,7 +624,7 @@ bitmask! {
}
pub trait Time {
type Moment: SimpleArithmetic + FullCodec + Clone + Default + Copy;
type Moment: SimpleArithmetic + Parameter + Default + Copy;
fn now() -> Self::Moment;
}