Skip to content

Commit

Permalink
expose set_timestamp for runtime benchmarks (paritytech#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
2 people authored and hirschenberger committed Apr 14, 2021
1 parent d8b19c1 commit 447662b
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 447662b

Please sign in to comment.