From b58d4e167c906b47df3d92652a234a403cadb884 Mon Sep 17 00:00:00 2001 From: Sabaun Taraki Date: Mon, 23 Sep 2024 18:32:41 +0400 Subject: [PATCH 1/2] Fix timestamp --- gtest/src/state/blocks.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gtest/src/state/blocks.rs b/gtest/src/state/blocks.rs index 27e8e4e979d..3e77b124cc8 100644 --- a/gtest/src/state/blocks.rs +++ b/gtest/src/state/blocks.rs @@ -84,8 +84,7 @@ impl BlocksManager { panic!("instance always initialized"); }; block_info.height += amount; - let duration = BLOCK_DURATION_IN_MSECS.saturating_mul(amount as u64); - block_info.timestamp += duration; + block_info.timestamp = now(); *block_info }) From e18858859fdded9aba94b6175ab1c4b4939e1d0d Mon Sep 17 00:00:00 2001 From: Sabaun Taraki Date: Mon, 23 Sep 2024 18:36:37 +0400 Subject: [PATCH 2/2] Remove the redundant use of const --- gtest/src/state/blocks.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/gtest/src/state/blocks.rs b/gtest/src/state/blocks.rs index 3e77b124cc8..1055d4c961d 100644 --- a/gtest/src/state/blocks.rs +++ b/gtest/src/state/blocks.rs @@ -18,7 +18,6 @@ //! Block timestamp and height management. -use crate::BLOCK_DURATION_IN_MSECS; use core_processor::configs::BlockInfo; use gear_common::{auxiliary::BlockNumber, storage::GetCallback}; use std::{