expose set_timestamp for runtime benchmarks (#8601)

* expose set_timestamp for runtime benchmarks

* Update frame/timestamp/src/lib.rs

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
Xiliang ChenandGuillaume Thiolliere authored and GitHub committed 2021-04-13 13:52:20 +02:00
1 parent f854194139
commit 3351cb8869
1 file changed
+1 -1
+1 -1
View File
@@ -258,7 +258,7 @@ impl<T: Config> Pallet<T> {
}
/// Set the timestamp to something in particular. Only used for tests.
#[cfg(feature = "std")]
#[cfg(any(feature = "runtime-benchmarks", feature = "std"))]
pub fn set_timestamp(now: T::Moment) {
Now::<T>::put(now);
}