Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
expose set_timestamp for runtime benchmarks (#8601)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
xlc and gui1117 authored Apr 13, 2021
1 parent dcce8b4 commit e09d142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frame/timestamp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit e09d142

Please sign in to comment.