Skip to content

Commit

Permalink
fixes docs lint and skips test when there is no cached state
Browse files Browse the repository at this point in the history
  • Loading branch information
arya2 committed Oct 21, 2024
1 parent 99423e0 commit d00a8ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion zebra-state/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,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>),
Expand Down
9 changes: 5 additions & 4 deletions zebrad/tests/acceptance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;
Expand Down

0 comments on commit d00a8ba

Please sign in to comment.