minor cleanup and rename

This commit is contained in:
Arya 2024-03-19 20:16:49 -04:00
parent 49fca309cf
commit 9db4762751
2 changed files with 5 additions and 9 deletions

View File

@ -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?
@ -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() {

View File

@ -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.