Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Arya <[email protected]>
  • Loading branch information
upbqdn and arya2 authored Feb 9, 2024
1 parent d8554c4 commit f1ef371
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zebra-chain/src/parameters/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl Network {
*self != Network::Mainnet
}

/// Returns the minimum Sapling birthday height.
/// Returns the Sapling activation height for this network.
pub fn sapling_activation_height(self) -> Height {
// Assume that the genesis block never contains shielded inputs or outputs.
//
Expand Down
2 changes: 1 addition & 1 deletion zebra-scan/src/service/scan_task/tests/vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn scan_task_processes_messages_correctly() -> Result<(), Report> {

// Send some keys to be registered
let num_keys = 10;
let sapling_keys = mock_sapling_viewing_keys(num_keys as u8);
let sapling_keys = mock_sapling_viewing_keys(num_keys.try_into().expect("should fit in u8"));
let sapling_keys_with_birth_heights: Vec<(String, Option<u32>)> =
sapling_keys.into_iter().zip((0..).map(Some)).collect();
mock_scan_task.register_keys(sapling_keys_with_birth_heights.clone())?;
Expand Down
2 changes: 1 addition & 1 deletion zebrad/tests/common/shielded_scan/scans_for_new_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub(crate) async fn run() -> Result<()> {
scan_task.register_keys(
parsed_keys
.into_iter()
.map(|key| (key.0, Some(key.1 .2 .0)))
.map(|(key, (_, _, Height(h)))| (key, Some(h)))
.collect(),
)?;

Expand Down

0 comments on commit f1ef371

Please sign in to comment.