Skip to content

Commit

Permalink
Applies suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
arya2 committed Oct 26, 2023
1 parent 789b5bc commit 8ef372d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions zebra-consensus/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,16 @@ impl From<Config> for InnerConfig {
fn from(Config { checkpoint_sync }: Config) -> Self {
Self {
checkpoint_sync,
..Default::default()
_debug_skip_parameter_preload: false,
}
}
}

/// Inner consensus configuration for backwards compatibility with fields that have been removed.
#[derive(Clone, Debug, Eq, PartialEq, Default, Deserialize, Serialize)]
/// Inner consensus configuration for backwards compatibility with older `zebrad.toml` files,
/// which contain fields that have been removed.
///
/// Rust API callers should use [`Config`].
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
#[serde(deny_unknown_fields, default)]
pub struct InnerConfig {
/// See [`Config`] for more details.
Expand All @@ -78,3 +81,12 @@ impl Default for Config {
}
}
}

impl Default for InnerConfig {
fn default() -> Self {
Self {
checkpoint_sync: true,
_debug_skip_parameter_preload: false,
}
}
}
2 changes: 1 addition & 1 deletion zebra-consensus/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ where
S: Service<zs::Request, Response = zs::Response, Error = BoxError> + Send + Clone + 'static,
S::Future: Send + 'static,
{
// Give other tasks priority before spawning the download and checkpoint tasks.
// Give other tasks priority before spawning the checkpoint task.
tokio::task::yield_now().await;

// Make sure the state contains the known best chain checkpoints, in a separate thread.
Expand Down
File renamed without changes.

0 comments on commit 8ef372d

Please sign in to comment.