From 4387a5c190902fc25451cf14b8b854d1dfe2800f Mon Sep 17 00:00:00 2001 From: JasonTulp Date: Thu, 19 Oct 2023 17:12:17 +1100 Subject: [PATCH] Fix inherent data hopefully --- primitives/timestamp/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/primitives/timestamp/src/lib.rs b/primitives/timestamp/src/lib.rs index 0b839e0553802..72c9359b5febb 100644 --- a/primitives/timestamp/src/lib.rs +++ b/primitives/timestamp/src/lib.rs @@ -23,6 +23,9 @@ use codec::{Decode, Encode}; use sp_inherents::{InherentData, InherentIdentifier, IsFatalError}; use sp_std::time::Duration; +#[cfg(feature = "std")] +use log::trace; + /// The identifier for the `timestamp` inherent. pub const INHERENT_IDENTIFIER: InherentIdentifier = *b"timstap0"; @@ -232,7 +235,7 @@ impl sp_inherents::InherentDataProvider for InherentDataProvider { &self, inherent_data: &mut InherentData, ) -> Result<(), sp_inherents::Error> { - let timestamp = self.timestamp; + let timestamp = self.timestamp.as_millis(); // TRN HOTFIX: mutate timestamp to make it revert back in time and have slots // happen at 6x their speed from then until we have caught up with the present time.