From 445de4ff6e40a9855aec2bcfaaa1ddb901cca3ce Mon Sep 17 00:00:00 2001 From: teor Date: Wed, 29 Nov 2023 15:33:42 +1000 Subject: [PATCH] Fix an unused import in a test --- zebrad/tests/common/config.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/zebrad/tests/common/config.rs b/zebrad/tests/common/config.rs index 38dd75d4a8c..07cb70c4291 100644 --- a/zebrad/tests/common/config.rs +++ b/zebrad/tests/common/config.rs @@ -15,7 +15,7 @@ use std::{ use color_eyre::eyre::Result; use tempfile::TempDir; -use zebra_chain::parameters::Network::{self, *}; +use zebra_chain::parameters::Network; use zebra_test::net::random_known_port; use zebrad::{ components::{mempool, sync, tracing}, @@ -70,10 +70,11 @@ pub fn default_test_config(net: Network) -> Result { #[cfg(feature = "getblocktemplate-rpcs")] { - let miner_address = if network.network == Mainnet { - "t3dvVE3SQEi7kqNzwrfNePxZ1d4hUyztBA1" - } else { + let miner_address = if network.network.is_a_test_network() { + // Assume test networks all use the same address prefix and format "t27eWDgjFYJGVXmzrXeVjnb5J3uXDM9xH9v" + } else { + "t3dvVE3SQEi7kqNzwrfNePxZ1d4hUyztBA1" }; mining.miner_address = Some(miner_address.parse().expect("hard-coded address is valid"));