Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion integration-tests/tests/json_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -715,8 +715,10 @@ async fn z_get_address_utxos_inner() {
mod zcashd {
use super::*;

#[allow(deprecated)]
pub(crate) mod zcash_indexer {
use zaino_state::LightWalletIndexer;
use zaino_fetch::jsonrpsee::response::block_header::GetBlockHeaderError;
use zaino_state::{FetchServiceError, LightWalletIndexer};
use zebra_rpc::methods::GetBlock;

use super::*;
Expand Down Expand Up @@ -939,6 +941,23 @@ mod zcashd {
.unwrap();
assert_eq!(zcashd_get_block_header, zainod_block_header_response);
}

// Try to fetch a non-existent block header
match zcashd_subscriber
.get_block_header(
"00000000008b4fdc4bae2868208f752526abfa441121cc0ac6526ddcb827befe".into(),
false,
)
.await
{
Err(FetchServiceError::RpcError(rpc_error)) => {
match GetBlockHeaderError::try_from(rpc_error) {
Ok(GetBlockHeaderError::MissingBlock { .. }) => (),
other => panic!("unexpected method error mapping: {:?}", other),
}
}
other => panic!("unexpected top-level error: {other:?}"),
}
}

#[tokio::test(flavor = "multi_thread")]
Expand Down
Loading
Loading