Skip to content

Commit c587caa

Browse files
authored
Merge pull request #95 from ala-mode/cleanup_post-PR
cleanup_post-PR
2 parents 1f83d23 + 06442c0 commit c587caa

File tree

5 files changed

+85
-66
lines changed

5 files changed

+85
-66
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This repository is a cargo "workspace" that manages two sibling crates.
44

5-
# Crate: zingo-infra-services in ./services
5+
# Crate: zingo-infra-services in ./services
66

77
Manages download and placement of static resources, these include:
88

@@ -14,7 +14,7 @@ This repository is a cargo "workspace" that manages two sibling crates.
1414
* zingo-cli
1515

1616
Once these are fetched, in place, and executable, this crate exposes interfaces to consuming crates that allow them to be managed.
17-
17+
1818
# Crate: zingo-infra-testutils in ./testutils
1919

2020
This is a crate that depends on zingo-infra-services, and leverages its public interfaces to provide test tooling, and a suite of integration tests built on those tools.

services/src/config.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,6 @@ pub(crate) fn zebrad(
103103
if activation_heights.canopy != 1.into() {
104104
panic!("canopy must be active for zebrad regtest mode. please set activation height to 1");
105105
}
106-
// let overwinter_activation_height: u32 = activation_heights.overwinter.into();
107-
// let sapling_activation_height: u32 = activation_heights.sapling.into();
108-
// let blossom_activation_height: u32 = activation_heights.blossom.into();
109-
// let heartwood_activation_height: u32 = activation_heights.heartwood.into();
110-
// let canopy_activation_height: u32 = activation_heights.canopy.into();
111106
let nu5_activation_height: u32 = activation_heights.nu5.into();
112107
let nu6_activation_height: u32 = activation_heights.nu6.into();
113108

services/src/validator.rs

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ use zcash_protocol::consensus::BlockHeight;
1010
use getset::{CopyGetters, Getters};
1111
use portpicker::Port;
1212
use tempfile::TempDir;
13-
use zebra_chain::{parameters::testnet::ConfiguredActivationHeights, serialization::ZcashSerialize as _};
13+
use zebra_chain::{
14+
parameters::testnet::ConfiguredActivationHeights, serialization::ZcashSerialize as _,
15+
};
1416
use zebra_node_services::rpc_client::RpcRequestClient;
15-
use zebra_rpc::{client::{BlockTemplateResponse, BlockTemplateTimeSource}, proposal_block_from_template};
17+
use zebra_rpc::{
18+
client::{BlockTemplateResponse, BlockTemplateTimeSource},
19+
proposal_block_from_template,
20+
};
1621

1722
use crate::{
1823
config,
@@ -284,15 +289,17 @@ impl Validator for Zcashd {
284289
.stdout(std::process::Stdio::piped())
285290
.stderr(std::process::Stdio::piped());
286291

287-
let mut handle = command.spawn().unwrap_or_else(|_| panic!(
288-
"{} {}",
289-
command.get_program().to_string_lossy(),
290-
command
291-
.get_args()
292-
.map(|arg| arg.to_string_lossy())
293-
.collect::<Vec<_>>()
294-
.join(" ")
295-
));
292+
let mut handle = command.spawn().unwrap_or_else(|_| {
293+
panic!(
294+
"{} {}",
295+
command.get_program().to_string_lossy(),
296+
command
297+
.get_args()
298+
.map(|arg| arg.to_string_lossy())
299+
.collect::<Vec<_>>()
300+
.join(" ")
301+
)
302+
});
296303

297304
logs::write_logs(&mut handle, &logs_dir);
298305
launch::wait(
@@ -569,7 +576,19 @@ impl Validator for Zebrad {
569576
.await
570577
.expect("response should be success output with a serialized `GetBlockTemplate`");
571578

572-
let network = zebra_chain::parameters::Network::new_regtest(ConfiguredActivationHeights { before_overwinter: Some(1), overwinter: Some(self.activation_heights.overwinter.into()), sapling: Some(self.activation_heights.sapling.into()), blossom: Some(self.activation_heights.blossom.into()), heartwood: Some(self.activation_heights.heartwood.into()), canopy: Some(self.activation_heights.canopy.into()), nu5: Some(self.activation_heights.nu5.into()), nu6: Some(self.activation_heights.nu6.into()), nu6_1: None,nu7: None});
579+
let network =
580+
zebra_chain::parameters::Network::new_regtest(ConfiguredActivationHeights {
581+
before_overwinter: Some(1),
582+
overwinter: Some(self.activation_heights.overwinter.into()),
583+
sapling: Some(self.activation_heights.sapling.into()),
584+
blossom: Some(self.activation_heights.blossom.into()),
585+
heartwood: Some(self.activation_heights.heartwood.into()),
586+
canopy: Some(self.activation_heights.canopy.into()),
587+
nu5: Some(self.activation_heights.nu5.into()),
588+
nu6: Some(self.activation_heights.nu6.into()),
589+
nu6_1: None,
590+
nu7: None,
591+
});
573592

574593
let block_data = hex::encode(
575594
proposal_block_from_template(

0 commit comments

Comments
 (0)