Spawn a future to start the collator (#851)

* Running a node without a database set in config is a bug, not a user error
This commit is contained in:
Cecile Tonglet
2020-02-27 16:18:38 +01:00
committed by GitHub
parent 0c93011760
commit 188a103e20
2 changed files with 52 additions and 8 deletions
+1 -1
View File
@@ -272,7 +272,7 @@ pub fn new_full<Runtime, Dispatch, Extrinsic>(
let is_authority = config.roles.is_authority() && !is_collator;
let force_authoring = config.force_authoring;
let max_block_data_size = max_block_data_size;
let db_path = if let Some(DatabaseConfig::Path { ref path, .. }) = config.database {
let db_path = if let DatabaseConfig::Path { ref path, .. } = config.expect_database() {
path.clone()
} else {
return Err("Starting a Polkadot service with a custom database isn't supported".to_string().into());