fixes docs lint and skips test when there is no cached state

This commit is contained in:
Arya 2024-10-07 15:15:18 -04:00
parent 5ae6ff1277
commit 2db4dd5a2b
2 changed files with 6 additions and 5 deletions

View File

@ -175,7 +175,7 @@ pub enum ReadResponse {
/// or `None` if the block was not found.
TransactionIdsForBlock(Option<Arc<[transaction::Hash]>>),
/// 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<transaction::Hash>),

View File

@ -3563,14 +3563,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?;