From 5ae6ff12779c04da9f89e535f1e3169ff2cd31ff Mon Sep 17 00:00:00 2001 From: Arya Date: Mon, 7 Oct 2024 14:31:53 -0400 Subject: [PATCH] adds a few log messages to the acceptance test, reduces frequency of logs for progress updates --- zebrad/tests/acceptance.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zebrad/tests/acceptance.rs b/zebrad/tests/acceptance.rs index a1240b4e7..6adc3b56f 100644 --- a/zebrad/tests/acceptance.rs +++ b/zebrad/tests/acceptance.rs @@ -3563,6 +3563,8 @@ async fn has_spending_transaction_ids() -> Result<()> { let test_name = "has_spending_transaction_ids_test"; let network = Mainnet; + tracing::info!("loading blocks for non-finalized state"); + let non_finalized_blocks = future_blocks(&network, test_type, test_name, 100).await?; let zebrad_state_path = test_type @@ -3573,6 +3575,8 @@ async fn has_spending_transaction_ids() -> Result<()> { common::cached_state::start_state_service_with_cache_dir(&Mainnet, zebrad_state_path) .await?; + tracing::info!("committing blocks to non-finalized state"); + for block in non_finalized_blocks { let expected_hash = block.hash(); let block = SemanticallyVerifiedBlock::with_hash(Arc::new(block), expected_hash); @@ -3597,6 +3601,8 @@ async fn has_spending_transaction_ids() -> Result<()> { .best_tip_hash() .expect("cached state must not be empty"); + tracing::info!("checking indexes of spending transaction ids"); + // Read the last 500 blocks - should be greater than the MAX_BLOCK_REORG_HEIGHT so that // both the finalized and non-finalized state are checked. let num_blocks_to_check = 500; @@ -3647,7 +3653,7 @@ async fn has_spending_transaction_ids() -> Result<()> { ); } - if i % 10 == 0 { + if i % 25 == 0 { tracing::info!( height = ?block.coinbase_height(), "has all spending tx ids at and above block"