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 LiandBastian Köcher authored and Bastian Köcher committed 2019-11-28 09:56:01 +01:00
1 parent 4a21f9bbfd
commit 630f7d8425
1 file changed
+3 -1
+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;
}