Forward enable_overseer_always (#4858)

Cumulus actually uses the `build_full` function. I missed that.
This commit is contained in:
Bastian Köcher
2022-02-07 17:05:53 +01:00
committed by GitHub
parent 8ee165c2c1
commit 59cddb9f23
3 changed files with 15 additions and 4 deletions
+1
View File
@@ -280,6 +280,7 @@ where
cli.run.beefy, cli.run.beefy,
jaeger_agent, jaeger_agent,
None, None,
false,
overseer_gen, overseer_gen,
) )
.map(|full| full.task_manager) .map(|full| full.task_manager)
+13 -4
View File
@@ -1257,6 +1257,14 @@ pub fn new_chain_ops(
Err(Error::NoRuntime) 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")] #[cfg(feature = "full-node")]
pub fn build_full( pub fn build_full(
config: Configuration, config: Configuration,
@@ -1265,6 +1273,7 @@ pub fn build_full(
enable_beefy: bool, enable_beefy: bool,
jaeger_agent: Option<std::net::SocketAddr>, jaeger_agent: Option<std::net::SocketAddr>,
telemetry_worker_handle: Option<TelemetryWorkerHandle>, telemetry_worker_handle: Option<TelemetryWorkerHandle>,
overseer_enable_anyways: bool,
overseer_gen: impl OverseerGen, overseer_gen: impl OverseerGen,
) -> Result<NewFull<Client>, Error> { ) -> Result<NewFull<Client>, Error> {
#[cfg(feature = "rococo-native")] #[cfg(feature = "rococo-native")]
@@ -1280,7 +1289,7 @@ pub fn build_full(
jaeger_agent, jaeger_agent,
telemetry_worker_handle, telemetry_worker_handle,
None, None,
false, overseer_enable_anyways,
overseer_gen, overseer_gen,
) )
.map(|full| full.with_client(Client::Rococo)) .map(|full| full.with_client(Client::Rococo))
@@ -1296,7 +1305,7 @@ pub fn build_full(
jaeger_agent, jaeger_agent,
telemetry_worker_handle, telemetry_worker_handle,
None, None,
false, overseer_enable_anyways,
overseer_gen, overseer_gen,
) )
.map(|full| full.with_client(Client::Kusama)) .map(|full| full.with_client(Client::Kusama))
@@ -1312,7 +1321,7 @@ pub fn build_full(
jaeger_agent, jaeger_agent,
telemetry_worker_handle, telemetry_worker_handle,
None, None,
false, overseer_enable_anyways,
overseer_gen, overseer_gen,
) )
.map(|full| full.with_client(Client::Westend)) .map(|full| full.with_client(Client::Westend))
@@ -1328,7 +1337,7 @@ pub fn build_full(
jaeger_agent, jaeger_agent,
telemetry_worker_handle, telemetry_worker_handle,
None, None,
false, overseer_enable_anyways,
overseer_gen, overseer_gen,
) )
.map(|full| full.with_client(Client::Polkadot)) .map(|full| full.with_client(Client::Polkadot))
@@ -68,6 +68,7 @@ fn main() -> Result<()> {
true, true,
None, None,
None, None,
false,
polkadot_service::RealOverseerGen, polkadot_service::RealOverseerGen,
) )
.map_err(|e| e.to_string())?; .map_err(|e| e.to_string())?;