From 9487d16cf70d933547ae0b0961c8826be22f1f82 Mon Sep 17 00:00:00 2001 From: keroro Date: Tue, 29 Nov 2022 15:15:27 +0800 Subject: [PATCH] feat(gwos): only keep constraint block.timestamp <= input.since for v1 --- gwos/contracts/gw-utils/src/fork.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gwos/contracts/gw-utils/src/fork.rs b/gwos/contracts/gw-utils/src/fork.rs index d43087937..69f6e3682 100644 --- a/gwos/contracts/gw-utils/src/fork.rs +++ b/gwos/contracts/gw-utils/src/fork.rs @@ -3,8 +3,10 @@ pub struct Fork; impl Fork { // Fork feature: block.timestamp < input.since + // + // NOTE: This feature is only enabled for v1. pub const fn enforce_block_timestamp_lower_than_since(global_state_version: u8) -> bool { - global_state_version >= 1 + global_state_version == 1 } // Fork feature: block.timestamp in the backbone range