Skip to content

Commit

Permalink
minor cleanup and rename
Browse files Browse the repository at this point in the history
  • Loading branch information
arya2 committed Mar 20, 2024
1 parent 4579722 commit 1c9dc31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions zebra-consensus/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,9 @@ where

// Make sure the state contains the known best chain checkpoints, in a separate thread.

let (checkpoint_state_service, checkpoint_sync, network_clone) = {
let checkpoint_state_service = state_service.clone();
let checkpoint_sync = config.checkpoint_sync;
let network_clone = network.clone();

(checkpoint_state_service, checkpoint_sync, network_clone)
};
let checkpoint_state_service = state_service.clone();
let checkpoint_sync = config.checkpoint_sync;
let checkpoint_network = network.clone();

let state_checkpoint_verify_handle = tokio::task::spawn(
// TODO: move this into an async function?
Expand All @@ -269,7 +265,7 @@ where
// > activation block hashes given in § 3.12 ‘Mainnet and Testnet’ on p. 20.
//
// <https://zips.z.cash/protocol/protocol.pdf#blockchain>
let full_checkpoints = network_clone.checkpoint_list();
let full_checkpoints = checkpoint_network.checkpoint_list();
let mut already_warned = false;

for (height, checkpoint_hash) in full_checkpoints.iter() {
Expand Down
2 changes: 1 addition & 1 deletion zebra-state/src/service/finalized_state/zebra_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ impl ZebraDb {

/// Returns the configured network for this database.
pub fn network(&self) -> Network {
self.db.network().clone()
self.db.network()
}

/// Returns the `Path` where the files used by this database are located.
Expand Down

0 comments on commit 1c9dc31

Please sign in to comment.