Skip to content
Closed
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
14 changes: 8 additions & 6 deletions zcash_local_net/src/validator/zebrad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
};
use zcash_protocol::PoolType;
use zingo_common_components::protocol::{ActivationHeights, NetworkType};
use zingo_test_vectors::ZEBRAD_DEFAULT_MINER;
use zingo_test_vectors::{REG_O_ADDR_FROM_ABANDONART, ZEBRAD_DEFAULT_MINER};

use std::{
net::{IpAddr, Ipv4Addr, SocketAddr},
Expand Down Expand Up @@ -138,11 +138,13 @@
activation_heights: ActivationHeights,
chain_cache: Option<PathBuf>,
) {
assert_eq!(
mine_to_pool,
PoolType::Transparent,
"Zebra can only mine to transparent using this test infrastructure currently, but tried to set to {mine_to_pool}"
);
self.miner_address = match mine_to_pool {
PoolType::ORCHARD => REG_O_ADDR_FROM_ABANDONART.to_string(),
PoolType::SAPLING => {
panic!("Sapling mining pool is not supported for ZebradConfig test parameters");
}
PoolType::Transparent => ZEBRAD_DEFAULT_MINER.to_string(),
};
self.network_type = NetworkType::Regtest(activation_heights);
self.chain_cache = chain_cache;
}
Expand Down Expand Up @@ -194,13 +196,13 @@
/// `Ok(false)` for a `503 Service Unavailable`, and `Err` if the
/// HTTP request itself fails (port unreachable, malformed
/// response, etc.).
pub async fn healthy(&self) -> Result<bool, reqwest::Error> {

Check failure on line 199 in zcash_local_net/src/validator/zebrad.rs

View workflow job for this annotation

GitHub Actions / External Types (public API)

Unapproved external type `reqwest::error::Error` referenced in public API
self.fetch_health_status("healthy").await
}

/// `GET http://127.0.0.1:<health_listen_port>/ready`. Same
/// return convention as [`Self::healthy`].
pub async fn ready(&self) -> Result<bool, reqwest::Error> {

Check failure on line 205 in zcash_local_net/src/validator/zebrad.rs

View workflow job for this annotation

GitHub Actions / External Types (public API)

Unapproved external type `reqwest::error::Error` referenced in public API
self.fetch_health_status("ready").await
}

Expand Down
Loading