@@ -15050,7 +15050,7 @@ fn contract_limit_percentage_mempool_strategy_low_limit() {
1505015050
1505115051#[test]
1505215052#[ignore]
15053- /// Verify the block timestamp using `block-time`.
15053+ /// Verify the block timestamp using `stacks- block-time`.
1505415054fn check_block_time_keyword() {
1505515055 if env::var("BITCOIND_TEST") != Ok("1".into()) {
1505615056 return;
@@ -15157,25 +15157,25 @@ fn check_block_time_keyword() {
1515715157 let mut sender_nonce = 0;
1515815158 let contract_name = "test-contract";
1515915159 let contract = r#"
15160- (define-constant deploy-time block-time)
15160+ (define-constant deploy-time stacks- block-time)
1516115161(define-constant deploy-height stacks-block-height)
1516215162(define-read-only (get-current-time)
15163- block-time
15163+ stacks- block-time
1516415164)
1516515165(define-read-only (get-ihh (height uint)) (get-stacks-block-info? id-header-hash height))
1516615166(define-read-only (get-time (height uint)) (get-stacks-block-info? time height))
1516715167(define-read-only (get-height) stacks-block-height)
1516815168(define-read-only (get-previous-time (height uint))
1516915169 (ok (at-block (unwrap! (get-stacks-block-info? id-header-hash height) (err u100))
15170- block-time
15170+ stacks- block-time
1517115171 ))
1517215172)
1517315173(define-public (get-current-time-call)
15174- (ok block-time)
15174+ (ok stacks- block-time)
1517515175)
1517615176(define-public (get-previous-time-call (height uint))
1517715177 (ok (at-block (unwrap! (get-stacks-block-info? id-header-hash height) (err u100))
15178- block-time
15178+ stacks- block-time
1517915179 ))
1518015180)
1518115181"#;
@@ -15221,7 +15221,7 @@ fn check_block_time_keyword() {
1522115221 let current_time = current_time_value.expect_u128().unwrap();
1522215222 assert!(
1522315223 current_time > deploy_time,
15224- "block-time should be greater than the time at deployment"
15224+ "stacks- block-time should be greater than the time at deployment"
1522515225 );
1522615226
1522715227 let previous_time_result = call_read_only(
@@ -15292,13 +15292,16 @@ fn check_block_time_keyword() {
1529215292 match contract_call.function_name.as_str() {
1529315293 "get-current-time-call" => {
1529415294 info!("Current time: {}", time);
15295- assert!(time > current_time, "block-time should have advanced");
15295+ assert!(
15296+ time > current_time,
15297+ "stacks-block-time should have advanced"
15298+ );
1529615299 }
1529715300 "get-previous-time-call" => {
1529815301 info!("Previous time: {}", time);
1529915302 assert_eq!(
1530015303 time, deploy_time,
15301- "block-time should be the same as at deployment"
15304+ "stacks- block-time should be the same as at deployment"
1530215305 );
1530315306 }
1530415307 _ => panic!("Unexpected contract call"),
0 commit comments