From d00a8bac92065d4c20bb89b42eb587a1add6a9dc Mon Sep 17 00:00:00 2001 From: Arya Date: Mon, 7 Oct 2024 15:15:18 -0400 Subject: [PATCH] fixes docs lint and skips test when there is no cached state --- zebra-state/src/response.rs | 2 +- zebrad/tests/acceptance.rs | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/zebra-state/src/response.rs b/zebra-state/src/response.rs index 50e6c78f7d8..360a2eff26a 100644 --- a/zebra-state/src/response.rs +++ b/zebra-state/src/response.rs @@ -157,7 +157,7 @@ pub enum ReadResponse { /// or `None` if the block was not found. TransactionIdsForBlock(Option>), - /// Response to [`ReadRequest::TransactionIdForSpentOutPoint`], + /// Response to [`ReadRequest::SpendingTransactionId`], /// with an list of transaction hashes in block order, /// or `None` if the block was not found. TransactionId(Option), diff --git a/zebrad/tests/acceptance.rs b/zebrad/tests/acceptance.rs index 02ec0802407..e3fc64f6eb0 100644 --- a/zebrad/tests/acceptance.rs +++ b/zebrad/tests/acceptance.rs @@ -3557,14 +3557,15 @@ async fn has_spending_transaction_ids() -> Result<()> { let test_name = "has_spending_transaction_ids_test"; let network = Mainnet; + let Some(zebrad_state_path) = test_type.zebrad_state_path(test_name) else { + // Skip test if there's no cached state. + return Ok(()); + }; + 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 - .zebrad_state_path(test_name) - .expect("test requires a cached state"); - let (mut state, mut read_state, latest_chain_tip, _chain_tip_change) = common::cached_state::start_state_service_with_cache_dir(&Mainnet, zebrad_state_path) .await?;