Skip to content

Commit

Permalink
fix(iota-replay): verify_latest_tx_replay_testnet_mainnet but only fo…
Browse files Browse the repository at this point in the history
…r the testnet once mainnet is ready (#4401)

* fix(iota-replay): verify_latest_tx_replay_testnet_mainnet but only for testnet till mainnet is ready
 Rename extract_one_system_tx to extract_one_no_system_tx
  • Loading branch information
Dkwcs authored Dec 10, 2024
1 parent e51c090 commit 2ccffdf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions crates/iota-replay/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ impl Default for ReplayableNetworkConfigSet {
name: "testnet".to_string(),
epoch_zero_start_timestamp: 0,
epoch_zero_rgp: 0,
public_full_node: url_from_str("https://fullnode.testnet.iota.io:443")
public_full_node: url_from_str("https://api.testnet.iota.cafe")
.expect("invalid socket address")
.to_string(),
};
let devnet = ReplayableNetworkBaseConfig {
name: "devnet".to_string(),
epoch_zero_start_timestamp: 0,
epoch_zero_rgp: 0,
public_full_node: url_from_str("https://fullnode.devnet.iota.io:443")
public_full_node: url_from_str("https://api.devnet.iota.cafe")
.expect("invalid socket address")
.to_string(),
};
Expand Down
12 changes: 6 additions & 6 deletions crates/iota-replay/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ use crate::{

/// Keep searching for non-system TXs in the checkppints for this long
/// Very unlikely to take this long, but we want to be sure we find one
const NUM_CHECKPOINTS_TO_ATTEMPT: usize = 1_000;
const NUM_CHECKPOINTS_TO_ATTEMPT: usize = 10_000;

/// Checks that replaying the latest tx on each testnet and mainnet does not
/// fail
#[ignore]
#[tokio::test]
async fn verify_latest_tx_replay_testnet_mainnet() {
let _ = verify_latest_tx_replay_impl().await;
Expand All @@ -30,7 +29,8 @@ async fn verify_latest_tx_replay_impl() {
let urls: Vec<_> = default_cfg
.base_network_configs
.iter()
.filter(|q| q.name != "devnet") // Devnet is not always stable
// TODO: enable this when mainnet is launched
.filter(|q| q.name != "devnet" && q.name != "mainnet") // Devnet is not always stable, mainnet is not ready
.map(|c| c.public_full_node.clone())
.collect();

Expand Down Expand Up @@ -60,7 +60,7 @@ async fn verify_latest_tx_replay_impl() {
.unwrap()
.transactions;

let mut non_system_txs = extract_one_system_tx(&rpc_client, txs).await;
let mut non_system_txs = extract_one_no_system_tx(&rpc_client, txs).await;
num_checkpoint_trials_left -= 1;
while non_system_txs.is_none() && num_checkpoint_trials_left > 0 {
num_checkpoint_trials_left -= 1;
Expand All @@ -71,7 +71,7 @@ async fn verify_latest_tx_replay_impl() {
.await
.unwrap()
.transactions;
non_system_txs = extract_one_system_tx(&rpc_client, txs).await;
non_system_txs = extract_one_no_system_tx(&rpc_client, txs).await;
}

if non_system_txs.is_none() {
Expand Down Expand Up @@ -101,7 +101,7 @@ async fn verify_latest_tx_replay_impl() {
}
}

async fn extract_one_system_tx(
async fn extract_one_no_system_tx(
rpc_client: &IotaClient,
mut txs: Vec<TransactionDigest>,
) -> Option<TransactionDigest> {
Expand Down

0 comments on commit 2ccffdf

Please sign in to comment.