Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Forward enable_overseer_always (#4858)
Browse files Browse the repository at this point in the history
Cumulus actually uses the `build_full` function. I missed that.
  • Loading branch information
bkchr authored Feb 7, 2022
1 parent 0d76dc7 commit 43b390f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ where
cli.run.beefy,
jaeger_agent,
None,
false,
overseer_gen,
)
.map(|full| full.task_manager)
Expand Down
17 changes: 13 additions & 4 deletions node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,14 @@ pub fn new_chain_ops(
Err(Error::NoRuntime)
}

/// Build a full node.
///
/// The actual "flavor", aka if it will use `Polkadot`, `Rococo` or `Kusama` is determined based on
/// [`IdentifyVariant`] using the chain spec.
///
/// `overseer_enable_anyways` always enables the overseer, based on the provided `OverseerGenerator`,
/// regardless of the role the node has. The relay chain selection (longest or disputes-aware) is
/// still determined based on the role of the node. Likewise for authority discovery.
#[cfg(feature = "full-node")]
pub fn build_full(
config: Configuration,
Expand All @@ -1265,6 +1273,7 @@ pub fn build_full(
enable_beefy: bool,
jaeger_agent: Option<std::net::SocketAddr>,
telemetry_worker_handle: Option<TelemetryWorkerHandle>,
overseer_enable_anyways: bool,
overseer_gen: impl OverseerGen,
) -> Result<NewFull<Client>, Error> {
#[cfg(feature = "rococo-native")]
Expand All @@ -1280,7 +1289,7 @@ pub fn build_full(
jaeger_agent,
telemetry_worker_handle,
None,
false,
overseer_enable_anyways,
overseer_gen,
)
.map(|full| full.with_client(Client::Rococo))
Expand All @@ -1296,7 +1305,7 @@ pub fn build_full(
jaeger_agent,
telemetry_worker_handle,
None,
false,
overseer_enable_anyways,
overseer_gen,
)
.map(|full| full.with_client(Client::Kusama))
Expand All @@ -1312,7 +1321,7 @@ pub fn build_full(
jaeger_agent,
telemetry_worker_handle,
None,
false,
overseer_enable_anyways,
overseer_gen,
)
.map(|full| full.with_client(Client::Westend))
Expand All @@ -1328,7 +1337,7 @@ pub fn build_full(
jaeger_agent,
telemetry_worker_handle,
None,
false,
overseer_enable_anyways,
overseer_gen,
)
.map(|full| full.with_client(Client::Polkadot))
Expand Down
1 change: 1 addition & 0 deletions parachain/test-parachains/adder/collator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ fn main() -> Result<()> {
true,
None,
None,
false,
polkadot_service::RealOverseerGen,
)
.map_err(|e| e.to_string())?;
Expand Down

0 comments on commit 43b390f

Please sign in to comment.