From e51c090d22c2956566933cfe2141c488a51eec36 Mon Sep 17 00:00:00 2001 From: Pavlo Botnar Date: Tue, 10 Dec 2024 10:36:51 +0200 Subject: [PATCH] fix(iota, iota-replay): fix test_profiler test by unignoring it and pass valid tx_digest (#4396) * fix(iota, iota-replay): fix test_profiler test by unignoring it and pass valid tx_digest --- crates/iota-replay/src/replay.rs | 13 +------------ crates/iota/src/unit_tests/profiler_tests.rs | 3 +-- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/crates/iota-replay/src/replay.rs b/crates/iota-replay/src/replay.rs index a2e7ddff8d2..0c40b5c52ff 100644 --- a/crates/iota-replay/src/replay.rs +++ b/crates/iota-replay/src/replay.rs @@ -727,18 +727,7 @@ impl LocalExec { reason: "System transaction".to_string(), }); } - // Before protocol version 16, the generation of effects depends on the wrapped - // tombstones. It is not possible to retrieve such data for replay. - if tx_info.protocol_version.as_u64() < 16 { - warn!( - "Protocol version ({:?}) too old: {}, skipping transaction", - tx_info.protocol_version, tx_digest - ); - return Err(ReplayEngineError::TransactionNotSupported { - digest: *tx_digest, - reason: "Protocol version too old".to_string(), - }); - } + // Initialize the state necessary for execution // Get the input objects let input_objects = self.initialize_execution_env_state(tx_info).await?; diff --git a/crates/iota/src/unit_tests/profiler_tests.rs b/crates/iota/src/unit_tests/profiler_tests.rs index f9b6aadf208..ac053d7b032 100644 --- a/crates/iota/src/unit_tests/profiler_tests.rs +++ b/crates/iota/src/unit_tests/profiler_tests.rs @@ -36,7 +36,6 @@ fn test_macro_shows_feature_enabled() { } } -#[ignore] #[cfg(feature = "gas-profiler")] #[tokio::test(flavor = "multi_thread")] async fn test_profiler() { @@ -49,7 +48,7 @@ async fn test_profiler() { let profile_output = output_dir.path().join("profile.json"); let testnet_url = "https://api.testnet.iota.cafe".to_string(); - let tx_digest = "98KxVD14f2JgceKx4X27HaVAA2YGJ3Aazf6Y4tabpHa8".to_string(); + let tx_digest = "7qq4W43TqHg9tQPMvdAFW4Tz6J88KnPppBPR1hNKmQAd".to_string(); let cmd = ReplayToolCommand::ProfileTransaction { tx_digest,