Skip to content

Commit

Permalink
adds a few log messages to the acceptance test, reduces frequency of …
Browse files Browse the repository at this point in the history
…logs for progress updates
  • Loading branch information
arya2 committed Oct 7, 2024
1 parent fdad98d commit 95ccc40
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion zebrad/tests/acceptance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3557,6 +3557,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
Expand All @@ -3567,6 +3569,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);
Expand All @@ -3591,6 +3595,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;
Expand Down Expand Up @@ -3641,7 +3647,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"
Expand Down

0 comments on commit 95ccc40

Please sign in to comment.