From 848cbdc59612b41b0e572415e2500137979e5d15 Mon Sep 17 00:00:00 2001 From: Flouse Date: Wed, 18 May 2022 19:08:41 +0800 Subject: [PATCH] chore(test): disable cycles check for generator_log --- polyjuice-tests/src/helper.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/polyjuice-tests/src/helper.rs b/polyjuice-tests/src/helper.rs index 964daa9e..238853bc 100644 --- a/polyjuice-tests/src/helper.rs +++ b/polyjuice-tests/src/helper.rs @@ -42,7 +42,7 @@ pub const SUDT_VALIDATOR_SCRIPT_TYPE_HASH: [u8; 32] = [0xa2u8; 32]; pub const SECP_DATA: &[u8] = include_bytes!("../../build/secp256k1_data"); // polyjuice pub const BIN_DIR: &str = "../build"; -pub const GENERATOR_NAME: &str = "generator.aot"; +pub const GENERATOR_NAME: &str = "generator_log"; pub const VALIDATOR_NAME: &str = "validator"; pub const ROLLUP_SCRIPT_HASH: [u8; 32] = [0xa9u8; 32]; @@ -606,6 +606,10 @@ pub fn build_eth_l2_script(args: [u8; 20]) -> Script { } pub fn check_cycles(l2_tx_label: &str, used_cycles: u64, warning_cycles: u64) { + if GENERATOR_NAME.contains("_log") { + return; // disable cycles check + } + println!("[check_cycles] used_cycles: {}", used_cycles); assert!( used_cycles < warning_cycles,